From acd216a15db902294904a974f66e1ba18763dc4c Mon Sep 17 00:00:00 2001 From: Huang Weiyi Date: Wed, 8 Apr 2009 07:11:04 +0800 Subject: [ARM] S3C: remove duplicated #include Remove duplicated #include in arch/arm/mach-s3c2412/mach-jive.c. Signed-off-by: Huang Weiyi Signed-off-by: Ben Dooks diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c index 332bd32..d324f089 100644 --- a/arch/arm/mach-s3c2412/mach-jive.c +++ b/arch/arm/mach-s3c2412/mach-jive.c @@ -52,7 +52,6 @@ #include #include #include -#include static struct map_desc jive_iodesc[] __initdata = { }; -- cgit v0.10.2 From b7f9a94bf22e8dfa6420faac831e40d2492dd28c Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 8 Apr 2009 16:12:35 +0100 Subject: [ARM] SMDK6410: Request GPIOs for LCD power control Going forward gpio_request() will be a requirement for GPIO API users so call it for the LCD power GPIOs. With present code the kernel functions but generaets loud WARN_ON()s when using the unrequested GPIOs. Signed-off-by: Mark Brown Signed-off-by: Ben Dooks diff --git a/arch/arm/mach-s3c6410/mach-smdk6410.c b/arch/arm/mach-s3c6410/mach-smdk6410.c index 25f7935..7f473e4 100644 --- a/arch/arm/mach-s3c6410/mach-smdk6410.c +++ b/arch/arm/mach-s3c6410/mach-smdk6410.c @@ -166,6 +166,10 @@ static void __init smdk6410_machine_init(void) s3c_i2c1_set_platdata(NULL); s3c_fb_set_platdata(&smdk6410_lcd_pdata); + gpio_request(S3C64XX_GPN(5), "LCD power"); + gpio_request(S3C64XX_GPF(13), "LCD power"); + gpio_request(S3C64XX_GPF(15), "LCD power"); + i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); -- cgit v0.10.2 From db756394064f4059e2f542fc0d27e91ce57bf292 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 10 Mar 2009 23:21:48 +0000 Subject: [ARM] S3C: Export s3c_gpio_cfgpin and s3c_gpio_setpull for modules Add an export of the two GPIO configuration calls s3c_gpio_cfgpin and s3c_gpio_setpull to allow modules to use them (such as ASoC drivers) Signed-off-by: Ben Dooks Signed-off-by: Ben Dooks diff --git a/arch/arm/plat-s3c/gpio-config.c b/arch/arm/plat-s3c/gpio-config.c index 7642b97..08044de 100644 --- a/arch/arm/plat-s3c/gpio-config.c +++ b/arch/arm/plat-s3c/gpio-config.c @@ -13,6 +13,7 @@ */ #include +#include #include #include @@ -38,6 +39,7 @@ int s3c_gpio_cfgpin(unsigned int pin, unsigned int config) return ret; } +EXPORT_SYMBOL(s3c_gpio_cfgpin); int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull) { @@ -56,6 +58,7 @@ int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull) return ret; } +EXPORT_SYMBOL(s3c_gpio_setpull); #ifdef CONFIG_S3C_GPIO_CFG_S3C24XX int s3c_gpio_setcfg_s3c24xx_banka(struct s3c_gpio_chip *chip, -- cgit v0.10.2 From ec5cfbfc05b180a026b4ebce72f341ee196de262 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Fri, 17 Apr 2009 12:36:43 +0100 Subject: [ARM] S3C24XX: Fix sparse error in gpiolib.c Fix the following sparse error generated by including instead of gpiolib.c:78:22: warning: symbol 's3c24xx_gpios' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Ben Dooks diff --git a/arch/arm/plat-s3c24xx/gpiolib.c b/arch/arm/plat-s3c24xx/gpiolib.c index 94a341a..5c0491b 100644 --- a/arch/arm/plat-s3c24xx/gpiolib.c +++ b/arch/arm/plat-s3c24xx/gpiolib.c @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include -- cgit v0.10.2 From ad14ff37496baa4bee98ea99db8bb8615c648b49 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Fri, 17 Apr 2009 12:36:44 +0100 Subject: [ARM] S3C: Fix sparse warning from missing 's3c_device_hwmon' Fix the following sparse warning due to s3c_device_hwmon being missing from devs.c:380:24: warning: symbol 's3c_device_hwmon' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Ben Dooks diff --git a/arch/arm/plat-s3c/include/plat/devs.h b/arch/arm/plat-s3c/include/plat/devs.h index 6b1b523..26f0cec 100644 --- a/arch/arm/plat-s3c/include/plat/devs.h +++ b/arch/arm/plat-s3c/include/plat/devs.h @@ -34,6 +34,7 @@ extern struct platform_device s3c_device_iis; extern struct platform_device s3c_device_rtc; extern struct platform_device s3c_device_adc; extern struct platform_device s3c_device_sdi; +extern struct platform_device s3c_device_hwmon; extern struct platform_device s3c_device_hsmmc0; extern struct platform_device s3c_device_hsmmc1; extern struct platform_device s3c_device_hsmmc2; -- cgit v0.10.2 From 59c1ab60909ffacbf978ac72e4bb1d40d79f1465 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Fri, 17 Apr 2009 12:36:45 +0100 Subject: [ARM] JIVE: Fix sparse warnings about items which should be static Make 'jive_vgg2432a4_display' and 'jive_lcd_config' static as they are not exported, and are generating the following sparse warnings: mach-jive.c:280:26: warning: symbol 'jive_vgg2432a4_display' was not declared. Should it be static? mach-jive.c:313:28: warning: symbol 'jive_lcd_config' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Ben Dooks diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c index d324f089..8f0d37d 100644 --- a/arch/arm/mach-s3c2412/mach-jive.c +++ b/arch/arm/mach-s3c2412/mach-jive.c @@ -277,7 +277,7 @@ __setup("mtdset=", jive_mtdset); #define LCD_HTOT (LCD_HSYNC + LCD_LEFT_MARGIN + LCD_XRES + LCD_RIGHT_MARGIN) #define LCD_VTOT (LCD_VSYNC + LCD_LOWER_MARGIN + LCD_YRES + LCD_UPPER_MARGIN) -struct s3c2410fb_display jive_vgg2432a4_display[] = { +static struct s3c2410fb_display jive_vgg2432a4_display[] = { [0] = { .width = LCD_XRES, .height = LCD_YRES, @@ -310,7 +310,7 @@ struct s3c2410fb_display jive_vgg2432a4_display[] = { #define S3C2410_GPCCON_MASK(x) (3 << ((x) * 2)) #define S3C2410_GPDCON_MASK(x) (3 << ((x) * 2)) -struct s3c2410fb_mach_info jive_lcd_config = { +static struct s3c2410fb_mach_info jive_lcd_config = { .displays = jive_vgg2432a4_display, .num_displays = ARRAY_SIZE(jive_vgg2432a4_display), .default_display = 0, -- cgit v0.10.2 From 019dbaa11db56d8e5d868e02421ff236a054c0d8 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Fri, 17 Apr 2009 12:36:46 +0100 Subject: [ARM] Anubis: Fix sparse warnings for items that should be static Make 'anubis_ide_platdata' statis as it is not used outside the file it is in, fixing the following sparse warning: mach-anubis.c:246:27: warning: symbol 'anubis_ide_platdata' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Ben Dooks diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c index b05d56e..9c6abf9 100644 --- a/arch/arm/mach-s3c2440/mach-anubis.c +++ b/arch/arm/mach-s3c2440/mach-anubis.c @@ -243,7 +243,7 @@ static struct s3c2410_platform_nand anubis_nand_info = { /* IDE channels */ -struct pata_platform_info anubis_ide_platdata = { +static struct pata_platform_info anubis_ide_platdata = { .ioport_shift = 5, }; -- cgit v0.10.2 From 2a96ad05e93be75398871a2fce932ed234d03112 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Fri, 17 Apr 2009 12:36:47 +0100 Subject: [ARM] Osiris: Fix double initialisation in machine block The .init_machine entry in mach-osiris.c had the same entry twice, so remove one definition to fix the following warning from sparse: mach-osiris.c:416:3: warning: Initializer entry defined twice mach-osiris.c:418:3: also defined here Signed-off-by: Ben Dooks Signed-off-by: Ben Dooks diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c index 41a00f5..c8a4668 100644 --- a/arch/arm/mach-s3c2440/mach-osiris.c +++ b/arch/arm/mach-s3c2440/mach-osiris.c @@ -413,7 +413,6 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS") .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, .boot_params = S3C2410_SDRAM_PA + 0x100, .map_io = osiris_map_io, - .init_machine = osiris_init, .init_irq = s3c24xx_init_irq, .init_machine = osiris_init, .timer = &s3c24xx_timer, -- cgit v0.10.2 From f8c8ac8109ecdd3583b0ac9fd3adf058678a802e Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Fri, 17 Apr 2009 12:36:49 +0100 Subject: [ARM] S3C: Fix ADC driver sparse warning The symbol 's3c_adc_try' in arch/arm/plat-s3c24xx/adc.c does not need to be exported and thus should be static. This fixes the following sparse warning: adc.c:103:6: warning: symbol 's3c_adc_try' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Ben Dooks diff --git a/arch/arm/plat-s3c24xx/adc.c b/arch/arm/plat-s3c24xx/adc.c index 9a5c767..bc6f6a1 100644 --- a/arch/arm/plat-s3c24xx/adc.c +++ b/arch/arm/plat-s3c24xx/adc.c @@ -100,7 +100,7 @@ static void s3c_adc_dbgshow(struct adc_device *adc) readl(adc->regs + S3C2410_ADCDLY)); } -void s3c_adc_try(struct adc_device *adc) +static void s3c_adc_try(struct adc_device *adc) { struct s3c_adc_client *next = adc->ts_pend; -- cgit v0.10.2 From 0c3ee078251b85812e585b5cf5d1635afd73f4e2 Mon Sep 17 00:00:00 2001 From: Ramax Lo Date: Tue, 14 Apr 2009 23:56:18 +0800 Subject: [ARM] S3C24XX: ADC: Check pending queue before freeing adc client Check pending queue and remove the adc client being released. Signed-off-by: Ramax Lo Signed-off-by: Ben Dooks diff --git a/arch/arm/plat-s3c24xx/adc.c b/arch/arm/plat-s3c24xx/adc.c index bc6f6a1..91adfa7 100644 --- a/arch/arm/plat-s3c24xx/adc.c +++ b/arch/arm/plat-s3c24xx/adc.c @@ -190,6 +190,23 @@ EXPORT_SYMBOL_GPL(s3c_adc_register); void s3c_adc_release(struct s3c_adc_client *client) { /* We should really check that nothing is in progress. */ + if (adc_dev->cur == client) + adc_dev->cur = NULL; + if (adc_dev->ts_pend == client) + adc_dev->ts_pend = NULL; + else { + struct list_head *p, *n; + struct s3c_adc_client *tmp; + + list_for_each_safe(p, n, &adc_pending) { + tmp = list_entry(p, struct s3c_adc_client, pend); + if (tmp == client) + list_del(&tmp->pend); + } + } + + if (adc_dev->cur == NULL) + s3c_adc_try(adc_dev); kfree(client); } EXPORT_SYMBOL_GPL(s3c_adc_release); -- cgit v0.10.2