diff options
author | Rob Herring <rob.herring@calxeda.com> | 2012-11-07 17:59:14 -0600 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2012-11-07 17:59:14 -0600 |
commit | d3ad4a60a1b1448e59914eebefe1ccc8e64f9e2f (patch) | |
tree | f0862d1905a599cdbad86fcc8816d86a6f33459f /drivers/gpio/gpiolib.c | |
parent | e095c0d122c09efabe7d4136ce77f72c636c4879 (diff) | |
parent | e5c5f2adeb370559f4b221d57214db85858b786a (diff) |
Merge remote-tracking branch 'arm-soc/devel/debug_ll_init' into debug_ll
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r-- | drivers/gpio/gpiolib.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 5d6c71edc73..1c8d9e3380e 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) |