diff options
author | David S. Miller <davem@davemloft.net> | 2012-11-10 18:32:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-10 18:32:51 -0500 |
commit | d4185bbf62a5d8d777ee445db1581beb17882a07 (patch) | |
tree | 024b0badbd7c970b1983be6d8c345cc4a290cb31 /drivers/gpio/gpiolib.c | |
parent | c075b13098b399dc565b4d53f42047a8d40ed3ba (diff) | |
parent | a375413311b39005ef281bfd71ae8f4e3df22e97 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
Minor conflict between the BCM_CNIC define removal in net-next
and a bug fix added to net. Based upon a conflict resolution
patch posted by Stephen Rothwell.
Signed-off-by: David S. Miller <davem@davemloft.net>
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 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, | |||
623 | */ | 623 | */ |
624 | 624 | ||
625 | status = gpio_request(gpio, "sysfs"); | 625 | status = gpio_request(gpio, "sysfs"); |
626 | if (status < 0) | 626 | if (status < 0) { |
627 | if (status == -EPROBE_DEFER) | ||
628 | status = -ENODEV; | ||
627 | goto done; | 629 | goto done; |
628 | 630 | } | |
629 | status = gpio_export(gpio, true); | 631 | status = gpio_export(gpio, true); |
630 | if (status < 0) | 632 | if (status < 0) |
631 | gpio_free(gpio); | 633 | gpio_free(gpio); |
@@ -1191,8 +1193,10 @@ int gpio_request(unsigned gpio, const char *label) | |||
1191 | 1193 | ||
1192 | spin_lock_irqsave(&gpio_lock, flags); | 1194 | spin_lock_irqsave(&gpio_lock, flags); |
1193 | 1195 | ||
1194 | if (!gpio_is_valid(gpio)) | 1196 | if (!gpio_is_valid(gpio)) { |
1197 | status = -EINVAL; | ||
1195 | goto done; | 1198 | goto done; |
1199 | } | ||
1196 | desc = &gpio_desc[gpio]; | 1200 | desc = &gpio_desc[gpio]; |
1197 | chip = desc->chip; | 1201 | chip = desc->chip; |
1198 | if (chip == NULL) | 1202 | if (chip == NULL) |