[patch 29/43] gpiolib: fix request related issue

Greg KH
2009-01-31T03:09:39Z

[-- Attachment #1: gpiolib-fix-request-related-issue.patch --]
[-- Type: text/plain, Size: 822 bytes --]

2.6.28-stable review patch. If anyone has any objections, please let us know.

------------------

From: Magnus Damm <damm@igel.co.jp>

commit 7460db567bbca76bf087d1694d792a1a96bdaa26 upstream.

Fix request-already-requested handling in gpio_request().

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
drivers/gpio/gpiolib.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -789,6 +789,7 @@ int gpio_request(unsigned gpio, const ch
} else {
status = -EBUSY;
module_put(chip->owner);
+ goto done;
}

if (chip->request) {