All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri.Pinkava@vscht.cz (Pinkava J.)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] s3c24xx fix: freeze during suspend/resume on s3c24xx if some	GPIO banks not present
Date: Sun, 23 May 2010 15:18:44 +0200	[thread overview]
Message-ID: <4BF92B34.6090100@vscht.cz> (raw)
In-Reply-To: <4BF8B232.9020903@vscht.cz>

Dne 23.5.2010 06:42, Pinkava J. napsal(a):
> When saving GPIOs during suspend/resume we need skip missing GPIO banks, not
> trying get corresponding chip again and again in infinite loop.
> 
> Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
> ---
>  arch/arm/plat-samsung/pm-gpio.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/plat-samsung/pm-gpio.c b/arch/arm/plat-samsung/pm-gpio.c
> index d50ab9d..7df03f8 100644
> --- a/arch/arm/plat-samsung/pm-gpio.c
> +++ b/arch/arm/plat-samsung/pm-gpio.c
> @@ -331,8 +331,10 @@ void s3c_pm_save_gpios(void)
> 
>  	for (gpio_nr = 0; gpio_nr < S3C_GPIO_END;) {
Note that there is in for-linus/samsung4 working version usign

 	for (gpio_nr = 0; gpio_nr < S3C_GPIO_END; gpio_nr++) {

but into linus kernel was introduced a bug by last commit.

>  		ourchip = s3c_gpiolib_getchip(gpio_nr);
> -		if (!ourchip)
> +		if (!ourchip) {
> +			gpio_nr++;
>  			continue;
> +		}
> 
>  		s3c_pm_save_gpio(ourchip);
> 
> @@ -369,8 +371,10 @@ void s3c_pm_restore_gpios(void)
> 
>  	for (gpio_nr = 0; gpio_nr < S3C_GPIO_END;) {
>  		ourchip = s3c_gpiolib_getchip(gpio_nr);
> -		if (!ourchip)
> +		if (!ourchip) {
> +			gpio_nr++;
>  			continue;
> +		}
> 
>  		s3c_pm_resume_gpio(ourchip);
> 

      parent reply	other threads:[~2010-05-23 13:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-23  4:42 [PATCH] s3c24xx fix: freeze during suspend/resume on s3c24xx if some GPIO banks not present Pinkava J.
2010-05-23  9:19 ` Sergei Shtylyov
2010-05-23 12:34   ` Pinkava J.
2010-05-24  7:57     ` Sergei Shtylyov
2010-05-24  3:32   ` Ben Dooks
2010-05-23 13:18 ` Pinkava J. [this message]

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=4BF92B34.6090100@vscht.cz \
    --to=jiri.pinkava@vscht.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.