[PATCH v2.6.34-rc2] s3c: Fix GPIOs bank H and J not being preserved during suspend on S3C24XX
Vasily Khoruzhick
anarsoul at gmail.com
Fri Apr 23 02:33:08 EDT 2010
В сообщении от 30 марта 2010 11:23:06 автор Christian Pellegrin написал:
> With this patch the platform-specific define for the last defined GPIO
> on S3C machines is used instead of a hard-coded value (which is right
> only for the s3c2410). The gpio_nr being incremented by 1 too much (look
> for the gpio_nr++ in the for instruction) is fixed too although it
> doesn't make any trouble on current S3C implementations.
>
> Signed-off-by: Christian Pellegrin <chripell at fsfe.org>
Tested-by: Vasily Khoruzhick <anarsoul at gmail.com>
> ---
> arch/arm/mach-s3c2410/include/mach/gpio-track.h | 2 +-
> arch/arm/plat-samsung/pm-gpio.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-track.h
> b/arch/arm/mach-s3c2410/include/mach/gpio-track.h index acb2591..6371eaa
> 100644
> --- a/arch/arm/mach-s3c2410/include/mach/gpio-track.h
> +++ b/arch/arm/mach-s3c2410/include/mach/gpio-track.h
> @@ -23,7 +23,7 @@ static inline struct s3c_gpio_chip
> *s3c_gpiolib_getchip(unsigned int pin) {
> struct s3c_gpio_chip *chip;
>
> - if (pin > S3C2410_GPG(10))
> + if (pin > S3C_GPIO_END)
> return NULL;
>
> chip = &s3c24xx_gpios[pin/32];
> diff --git a/arch/arm/plat-samsung/pm-gpio.c
> b/arch/arm/plat-samsung/pm-gpio.c index 69a4c7f..1aac746 100644
> --- a/arch/arm/plat-samsung/pm-gpio.c
> +++ b/arch/arm/plat-samsung/pm-gpio.c
> @@ -343,7 +343,7 @@ void s3c_pm_save_gpios(void)
> ourchip->pm_save[2],
> ourchip->pm_save[3]);
>
> - gpio_nr += ourchip->chip.ngpio;
> + gpio_nr += ourchip->chip.ngpio - 1;
> gpio_nr += CONFIG_S3C_GPIO_SPACE;
> }
> }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100423/4a85e3ff/attachment.sig>
More information about the linux-arm-kernel
mailing list