diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-31 09:19:22 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-31 09:19:22 -0400 |
| commit | f13b1035ce8bbc27d4ce7c281cddd2718f2cf5b0 (patch) | |
| tree | 44419bd03c33e662302dd003f57d36e133144f91 /drivers/gpio/gpiolib.c | |
| parent | e910b63d009701ad4ebbeb089aba35707fa5d68e (diff) | |
| parent | 5da3e714e30d40145f4dd37d79de6bbbcb9e6137 (diff) | |
Merge branch 'shmobile' into devel
Diffstat (limited to 'drivers/gpio/gpiolib.c')
| -rw-r--r-- | drivers/gpio/gpiolib.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 3ca36542e338..4e51fe3c1fc4 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c | |||
| @@ -893,10 +893,12 @@ EXPORT_SYMBOL_GPL(gpio_sysfs_set_active_low); | |||
| 893 | void gpio_unexport(unsigned gpio) | 893 | void gpio_unexport(unsigned gpio) |
| 894 | { | 894 | { |
| 895 | struct gpio_desc *desc; | 895 | struct gpio_desc *desc; |
| 896 | int status = -EINVAL; | 896 | int status = 0; |
| 897 | 897 | ||
| 898 | if (!gpio_is_valid(gpio)) | 898 | if (!gpio_is_valid(gpio)) { |
| 899 | status = -EINVAL; | ||
| 899 | goto done; | 900 | goto done; |
| 901 | } | ||
| 900 | 902 | ||
| 901 | mutex_lock(&sysfs_lock); | 903 | mutex_lock(&sysfs_lock); |
| 902 | 904 | ||
| @@ -911,7 +913,6 @@ void gpio_unexport(unsigned gpio) | |||
| 911 | clear_bit(FLAG_EXPORT, &desc->flags); | 913 | clear_bit(FLAG_EXPORT, &desc->flags); |
| 912 | put_device(dev); | 914 | put_device(dev); |
| 913 | device_unregister(dev); | 915 | device_unregister(dev); |
| 914 | status = 0; | ||
| 915 | } else | 916 | } else |
| 916 | status = -ENODEV; | 917 | status = -ENODEV; |
| 917 | } | 918 | } |
