summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-11-15 10:34:22 +0000
committerGrant Likely <grant.likely@secretlab.ca>2012-11-15 10:34:22 +0000
commitda63d20bfb12827dd7747a841ea27348af3abc0a (patch)
treeba275a74d068f91b453c08b9bacf8afe9577db9b /drivers/gpio/gpiolib.c
parent55020c8056a83ef2181e4cddd39cb2b9f4b88c5a (diff)
parent77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff)
downloadblackbird-obmc-linux-da63d20bfb12827dd7747a841ea27348af3abc0a.tar.gz
blackbird-obmc-linux-da63d20bfb12827dd7747a841ea27348af3abc0a.zip
Merge tag 'v3.7-rc5' into devicetree/next
Linux 3.7-rc5
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r--drivers/gpio/gpiolib.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 5d6c71edc739..1c8d9e3380e1 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -623,9 +623,11 @@ static ssize_t export_store(struct class *class,
*/
status = gpio_request(gpio, "sysfs");
- if (status < 0)
+ if (status < 0) {
+ if (status == -EPROBE_DEFER)
+ status = -ENODEV;
goto done;
-
+ }
status = gpio_export(gpio, true);
if (status < 0)
gpio_free(gpio);
@@ -1191,8 +1193,10 @@ int gpio_request(unsigned gpio, const char *label)
spin_lock_irqsave(&gpio_lock, flags);
- if (!gpio_is_valid(gpio))
+ if (!gpio_is_valid(gpio)) {
+ status = -EINVAL;
goto done;
+ }
desc = &gpio_desc[gpio];
chip = desc->chip;
if (chip == NULL)
OpenPOWER on IntegriCloud