linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: anarsoul@gmail.com (Vasily Khoruzhick)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2.6.34-rc2] s3c: Fix GPIOs bank H and J not being preserved during suspend on S3C24XX
Date: Fri, 23 Apr 2010 09:33:08 +0300	[thread overview]
Message-ID: <201004230933.21902.anarsoul@gmail.com> (raw)
In-Reply-To: <1269937386-7597-1-git-send-email-chripell@fsfe.org>

? ????????? ?? 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@fsfe.org>
Tested-by: Vasily Khoruzhick <anarsoul@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>

  reply	other threads:[~2010-04-23  6:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30  8:23 [PATCH v2.6.34-rc2] s3c: Fix GPIOs bank H and J not being preserved during suspend on S3C24XX Christian Pellegrin
2010-04-23  6:33 ` Vasily Khoruzhick [this message]
2010-05-04  7:01 ` Ben Dooks
2010-05-04  7:34   ` christian pellegrin
2010-05-06  5:51     ` Ben Dooks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201004230933.21902.anarsoul@gmail.com \
    --to=anarsoul@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).