From f4cb1a89640ee28b66081061e55871f5e0ac685f Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 26 Aug 2008 22:54:03 +0100 Subject: [ARM] S3C24XX: Fix sparse warnings in arch/arm/plat-s3c24xx/gpiolib.c Fix the following problems spotted by sparse: warning: symbol 's3c24xx_gpiolib_input' was not declared. Should it be static? warning: symbol 's3c24xx_gpiolib_output' was not declared. Should it be static? warning: symbol 's3c24xx_gpiolib_set' was not declared. Should it be static? warning: symbol 's3c24xx_gpiolib_get' was not declared. Should it be static? warning: symbol 'gpios' was not declared. Should it be static? Signed-off-by: Ben Dooks --- arch/arm/plat-s3c24xx/gpiolib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'arch/arm/plat-s3c24xx') diff --git a/arch/arm/plat-s3c24xx/gpiolib.c b/arch/arm/plat-s3c24xx/gpiolib.c index 849f8469714..3caec6bad3e 100644 --- a/arch/arm/plat-s3c24xx/gpiolib.c +++ b/arch/arm/plat-s3c24xx/gpiolib.c @@ -39,7 +39,7 @@ static inline struct s3c24xx_gpio_chip *to_s3c_chip(struct gpio_chip *gpc) * drivers themsevles. */ -int s3c24xx_gpiolib_input(struct gpio_chip *chip, unsigned offset) +static int s3c24xx_gpiolib_input(struct gpio_chip *chip, unsigned offset) { struct s3c24xx_gpio_chip *ourchip = to_s3c_chip(chip); void __iomem *base = ourchip->base; @@ -58,7 +58,7 @@ int s3c24xx_gpiolib_input(struct gpio_chip *chip, unsigned offset) return 0; } -int s3c24xx_gpiolib_output(struct gpio_chip *chip, +static int s3c24xx_gpiolib_output(struct gpio_chip *chip, unsigned offset, int value) { struct s3c24xx_gpio_chip *ourchip = to_s3c_chip(chip); @@ -86,7 +86,8 @@ int s3c24xx_gpiolib_output(struct gpio_chip *chip, return 0; } -void s3c24xx_gpiolib_set(struct gpio_chip *chip, unsigned offset, int value) +static void s3c24xx_gpiolib_set(struct gpio_chip *chip, + unsigned offset, int value) { struct s3c24xx_gpio_chip *ourchip = to_s3c_chip(chip); void __iomem *base = ourchip->base; @@ -104,7 +105,7 @@ void s3c24xx_gpiolib_set(struct gpio_chip *chip, unsigned offset, int value) local_irq_restore(flags); } -int s3c24xx_gpiolib_get(struct gpio_chip *chip, unsigned offset) +static int s3c24xx_gpiolib_get(struct gpio_chip *chip, unsigned offset) { struct s3c24xx_gpio_chip *ourchip = to_s3c_chip(chip); unsigned long val; @@ -150,8 +151,7 @@ static int s3c24xx_gpiolib_banka_output(struct gpio_chip *chip, return 0; } - -struct s3c24xx_gpio_chip gpios[] = { +static struct s3c24xx_gpio_chip gpios[] = { [0] = { .base = S3C24XX_GPIO_BASE(S3C2410_GPA0), .chip = { -- cgit v1.2.3 From 1442e662d8e159a3b67280d284c7b91f9fb31ba4 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 26 Aug 2008 22:54:04 +0100 Subject: [ARM] S3C24XX: Fix spare errors in pwm-clock driver Fix the following sparse warnings in arch/arm/plat-s3c24xx/pwm-clock.c: warning: symbol 'clk_timer_scaler' was not declared. Should it be static? warning: symbol 'clk_timer_tclk' was not declared. Should it be static? warning: symbol 'clk_timer_tdiv' was not declared. Should it be static? Signed-off-by: Ben Dooks --- arch/arm/plat-s3c24xx/pwm-clock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/arm/plat-s3c24xx') diff --git a/arch/arm/plat-s3c24xx/pwm-clock.c b/arch/arm/plat-s3c24xx/pwm-clock.c index ccfdc9d7ae4..306cc9c6f9e 100644 --- a/arch/arm/plat-s3c24xx/pwm-clock.c +++ b/arch/arm/plat-s3c24xx/pwm-clock.c @@ -89,7 +89,7 @@ static unsigned long clk_pwm_scaler_getrate(struct clk *clk) /* TODO - add set rate calls. */ -struct clk clk_timer_scaler[] = { +static struct clk clk_timer_scaler[] = { [0] = { .name = "pwm-scaler0", .id = -1, @@ -102,7 +102,7 @@ struct clk clk_timer_scaler[] = { }, }; -struct clk clk_timer_tclk[] = { +static struct clk clk_timer_tclk[] = { [0] = { .name = "pwm-tclk0", .id = -1, @@ -232,7 +232,7 @@ static int clk_pwm_tdiv_set_rate(struct clk *clk, unsigned long rate) return 0; } -struct pwm_tdiv_clk clk_timer_tdiv[] = { +static struct pwm_tdiv_clk clk_timer_tdiv[] = { [0] = { .clk = { .name = "pwm-tdiv", -- cgit v1.2.3 From 103895925fbee5bd612ce2217f619df717aa1bda Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 26 Aug 2008 22:54:05 +0100 Subject: [ARM] S3C24XX: Fix sparse warnings in pwm.c Fix the following sparse warnings in arch/arm/plat-s3c24xx/pwm.c: warning: symbol 's3c_device_timer' was not declared. Should it be static? warning: symbol 'pwm_calc_tin' was not declared. Should it be static? Signed-off-by: Ben Dooks --- arch/arm/plat-s3c24xx/pwm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/arm/plat-s3c24xx') diff --git a/arch/arm/plat-s3c24xx/pwm.c b/arch/arm/plat-s3c24xx/pwm.c index 18c4bdc49a0..3b6861936dd 100644 --- a/arch/arm/plat-s3c24xx/pwm.c +++ b/arch/arm/plat-s3c24xx/pwm.c @@ -19,6 +19,7 @@ #include #include +#include #include struct pwm_device { @@ -168,7 +169,7 @@ void pwm_disable(struct pwm_device *pwm) EXPORT_SYMBOL(pwm_disable); -unsigned long pwm_calc_tin(struct pwm_device *pwm, unsigned long freq) +static unsigned long pwm_calc_tin(struct pwm_device *pwm, unsigned long freq) { unsigned long tin_parent_rate; unsigned int div; -- cgit v1.2.3 From 66592eee16eaede05734ecc6fef797dafd2c6a12 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 26 Aug 2008 22:54:06 +0100 Subject: [ARM] S3C24XX: pwm.c: stop debugging output Move debugging output to dev_dbg() instead of dev_info(). Signed-off-by: Ben Dooks --- arch/arm/plat-s3c24xx/pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/plat-s3c24xx') diff --git a/arch/arm/plat-s3c24xx/pwm.c b/arch/arm/plat-s3c24xx/pwm.c index 3b6861936dd..7a92c938542 100644 --- a/arch/arm/plat-s3c24xx/pwm.c +++ b/arch/arm/plat-s3c24xx/pwm.c @@ -39,7 +39,7 @@ struct pwm_device { unsigned char pwm_id; }; -#define pwm_dbg(_pwm, msg...) dev_info(&(_pwm)->pdev->dev, msg) +#define pwm_dbg(_pwm, msg...) dev_dbg(&(_pwm)->pdev->dev, msg) static struct clk *clk_scaler[2]; -- cgit v1.2.3