lkml.org 
[lkml]   [2008]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH] gpiolib: request fixes
From: Magnus Damm <damm@igel.co.jp>

Fix request related issues in gpiolib such as:
- fix request-already-requested handling in gpio_request()
- clear FLAG_REQUESTED on request error in gpio_direction_input()
- clear FLAG_REQUESTED on request error in gpio_direction_output()

Signed-off-by: Magnus Damm <damm@igel.co.jp>
---

drivers/gpio/gpiolib.c | 3 +++
1 file changed, 3 insertions(+)

--- 0001/drivers/gpio/gpiolib.c
+++ work/drivers/gpio/gpiolib.c 2008-12-26 13:09:50.000000000 +0900
@@ -789,6 +789,7 @@ int gpio_request(unsigned gpio, const ch
} else {
status = -EBUSY;
module_put(chip->owner);
+ goto done;
}

if (chip->request) {
@@ -924,6 +925,7 @@ int gpio_direction_input(unsigned gpio)
/* and it's not available to anyone else ...
* gpio_request() is the fully clean solution.
*/
+ clear_bit(FLAG_REQUESTED, &desc->flags);
goto lose;
}
}
@@ -977,6 +979,7 @@ int gpio_direction_output(unsigned gpio,
/* and it's not available to anyone else ...
* gpio_request() is the fully clean solution.
*/
+ clear_bit(FLAG_REQUESTED, &desc->flags);
goto lose;
}
}

\
 
 \ /
  Last update: 2008-12-26 06:25    [W:0.034 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site