arm: ep93xx: Don't try to release not acquired GPIO lines
PATCH 1/1 arm: ep93xx: Don't try to release not acquired GPIO lines
Fail path of ep93xx_keypad_acquire_gpio() tries to release GPIO lines not acquired successfully before. Fix this.
---
Patch applies to v3.4rc1.
arch/arm/mach-ep93xx/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-ep93xx/core.c +1 -1
@@ -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)); }
PATCH 1/1 arm: ep93xx: Don't try to release not acquired GPIO lines
Quoted 18 lines · Rafal Prylowski
Fail path of
ep93xx_keypad_acquire_gpio()tries to release GPIO lines not acquired successfully before. Fix this.Signed-off-by Rafal Prylowski <[email protected]>Cc H Hartley Sweeten <[email protected]>Cc Ryan Mallon <[email protected]>---
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
===================================================================
arch/arm/mach-ep93xx/core.c int ep93xx_keypad_acquire_gpio(struct pl · line 740
Quoted 8 lines
arch/arm/mach-ep93xx/core.c +1
-1@@ -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)); }
Thanks!
Ryan Mallon
AppliedPATCH 1/1 arm: ep93xx: Don't try to release not acquired GPIO lines
Quoted 14 lines · H Hartley Sweeten
Quoted 13 lines · Rafal Prylowski
Fail path of
ep93xx_keypad_acquire_gpio()tries to release GPIO lines not acquired successfully before. Fix this.Signed-off-by Rafal Prylowski <[email protected]>Cc H Hartley Sweeten <[email protected]>Cc Ryan Mallon <[email protected]>---
Patch applies to v3.4rc1.arch/arm/mach-ep93xx/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
arch/arm/mach-ep93xx/core.c int ep93xx_keypad_acquire_gpio(struct pl · line 740
Quoted 13 lines
Index:
linux-2.6/arch/arm/mach-ep93xx/core.c
===================================================================arch/arm/mach-ep93xx/core.c +1
-1@@ -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)); }
Applied to ep93xx-fixes on https://github.com/RyanMallon/linux-ep93xx
Thanks,
~Ryan