linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: ep93xx: Don't try to release not acquired GPIO lines
@ 2012-04-05 11:44 Rafal Prylowski
  2012-04-05 16:39 ` H Hartley Sweeten
  0 siblings, 1 reply; 3+ messages in thread
From: Rafal Prylowski @ 2012-04-05 11:44 UTC (permalink / raw)
  To: linux-arm-kernel

Fail path of ep93xx_keypad_acquire_gpio() tries to release
GPIO lines not acquired successfully before. Fix this.

Signed-off-by: Rafal Prylowski <prylowski@metasoft.pl>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>

---
Patch applies to v3.4rc1.

 arch/arm/mach-ep93xx/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/arm/mach-ep93xx/core.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-ep93xx/core.c
+++ linux-2.6/arch/arm/mach-ep93xx/core.c
@@ -734,7 +734,7 @@ int ep93xx_keypad_acquire_gpio(struct pl
 fail_gpio_d:
 	gpio_free(EP93XX_GPIO_LINE_C(i));
 fail_gpio_c:
-	for ( ; i >= 0; --i) {
+	for (--i; i >= 0; --i) {
 		gpio_free(EP93XX_GPIO_LINE_C(i));
 		gpio_free(EP93XX_GPIO_LINE_D(i));
 	}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] arm: ep93xx: Don't try to release not acquired GPIO lines
  2012-04-05 11:44 [PATCH] arm: ep93xx: Don't try to release not acquired GPIO lines Rafal Prylowski
@ 2012-04-05 16:39 ` H Hartley Sweeten
  2012-04-11  2:09   ` Ryan Mallon
  0 siblings, 1 reply; 3+ messages in thread
From: H Hartley Sweeten @ 2012-04-05 16:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday, April 05, 2012 4:44 AM, Rafal Prylowski wrote:
> Fail path of ep93xx_keypad_acquire_gpio() tries to release
> GPIO lines not acquired successfully before. Fix this.
>
> Signed-off-by: Rafal Prylowski <prylowski@metasoft.pl>
> Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ryan Mallon <rmallon@gmail.com>
>
> ---
> Patch applies to v3.4rc1.
>
>  arch/arm/mach-ep93xx/core.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-2.6/arch/arm/mach-ep93xx/core.c
> ===================================================================
> --- linux-2.6.orig/arch/arm/mach-ep93xx/core.c
> +++ linux-2.6/arch/arm/mach-ep93xx/core.c
> @@ -734,7 +734,7 @@ int ep93xx_keypad_acquire_gpio(struct pl
>  fail_gpio_d:
>  	gpio_free(EP93XX_GPIO_LINE_C(i));
>  fail_gpio_c:
> -	for ( ; i >= 0; --i) {
> +	for (--i; i >= 0; --i) {
>  		gpio_free(EP93XX_GPIO_LINE_C(i));
>  		gpio_free(EP93XX_GPIO_LINE_D(i));
>  	}

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] arm: ep93xx: Don't try to release not acquired GPIO lines
  2012-04-05 16:39 ` H Hartley Sweeten
@ 2012-04-11  2:09   ` Ryan Mallon
  0 siblings, 0 replies; 3+ messages in thread
From: Ryan Mallon @ 2012-04-11  2:09 UTC (permalink / raw)
  To: linux-arm-kernel

On 06/04/12 02:39, H Hartley Sweeten wrote:

> On Thursday, April 05, 2012 4:44 AM, Rafal Prylowski wrote:
>> Fail path of ep93xx_keypad_acquire_gpio() tries to release
>> GPIO lines not acquired successfully before. Fix this.
>>
>> Signed-off-by: Rafal Prylowski <prylowski@metasoft.pl>
>> Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Ryan Mallon <rmallon@gmail.com>
>>
>> ---
>> Patch applies to v3.4rc1.
>>
>>  arch/arm/mach-ep93xx/core.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Index: linux-2.6/arch/arm/mach-ep93xx/core.c
>> ===================================================================
>> --- linux-2.6.orig/arch/arm/mach-ep93xx/core.c
>> +++ linux-2.6/arch/arm/mach-ep93xx/core.c
>> @@ -734,7 +734,7 @@ int ep93xx_keypad_acquire_gpio(struct pl
>>  fail_gpio_d:
>>  	gpio_free(EP93XX_GPIO_LINE_C(i));
>>  fail_gpio_c:
>> -	for ( ; i >= 0; --i) {
>> +	for (--i; i >= 0; --i) {
>>  		gpio_free(EP93XX_GPIO_LINE_C(i));
>>  		gpio_free(EP93XX_GPIO_LINE_D(i));
>>  	}
> 
> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>


Applied to ep93xx-fixes on https://github.com/RyanMallon/linux-ep93xx

Thanks,
~Ryan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-11  2:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-05 11:44 [PATCH] arm: ep93xx: Don't try to release not acquired GPIO lines Rafal Prylowski
2012-04-05 16:39 ` H Hartley Sweeten
2012-04-11  2:09   ` Ryan Mallon

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).