diff options
author | Tony Lindgren <tony@atomide.com> | 2010-08-02 07:23:38 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-08-02 07:23:38 -0400 |
commit | 055a1b8c9927bc587f293020a54c6cd8e24dfac0 (patch) | |
tree | db7c8d00931180c4896c9e00d2cb506939592cda /drivers/gpio | |
parent | 8a6f7e14fc3b3ea911838c3f4ce137cb8a3d134a (diff) | |
parent | f535daed925c2d3c1db06b06a63c4955f2c51988 (diff) |
Merge branch 'devel-misc' into omap-for-linus
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/cs5535-gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/gpiolib.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpio/cs5535-gpio.c b/drivers/gpio/cs5535-gpio.c index f73a1555e49d..e23c06893d19 100644 --- a/drivers/gpio/cs5535-gpio.c +++ b/drivers/gpio/cs5535-gpio.c | |||
@@ -352,6 +352,6 @@ static void __exit cs5535_gpio_exit(void) | |||
352 | module_init(cs5535_gpio_init); | 352 | module_init(cs5535_gpio_init); |
353 | module_exit(cs5535_gpio_exit); | 353 | module_exit(cs5535_gpio_exit); |
354 | 354 | ||
355 | MODULE_AUTHOR("Andres Salomon <dilinger@collabora.co.uk>"); | 355 | MODULE_AUTHOR("Andres Salomon <dilinger@queued.net>"); |
356 | MODULE_DESCRIPTION("AMD CS5535/CS5536 GPIO driver"); | 356 | MODULE_DESCRIPTION("AMD CS5535/CS5536 GPIO driver"); |
357 | MODULE_LICENSE("GPL"); | 357 | MODULE_LICENSE("GPL"); |
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 | } |