]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
updated queue-3.14/gpio-sysfs-fix-gpio-device-attribute-leak.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jan 2015 17:49:33 +0000 (09:49 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jan 2015 17:49:33 +0000 (09:49 -0800)
queue-3.14/gpio-sysfs-fix-gpio-device-attribute-leak.patch

index dd9e3caa1757e461349bbf88b0f19fb02b86836f..f238e14ba51ef49db3ea594b7fc875d50250e90c 100644 (file)
@@ -21,7 +21,6 @@ Signed-off-by: Johan Hovold <johan@kernel.org>
 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
-
 ---
  drivers/gpio/gpiolib.c |   27 +++++++++++++--------------
  1 file changed, 13 insertions(+), 14 deletions(-)
@@ -99,12 +98,12 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  fail_unregister_device:
        device_unregister(dev);
  fail_unlock:
-@@ -994,6 +991,8 @@ void gpiod_unexport(struct gpio_desc *de
+@@ -1003,6 +1000,8 @@ void gpiod_unexport(struct gpio_desc *de
+       mutex_unlock(&sysfs_lock);
  
-               dev = class_find_device(&gpio_class, NULL, desc, match_export);
-               if (dev) {
-+                      device_remove_file(dev, &dev_attr_edge);
-+                      device_remove_file(dev, &dev_attr_direction);
-                       gpio_setup_irq(desc, dev, 0);
-                       clear_bit(FLAG_EXPORT, &desc->flags);
-               } else
+       if (dev) {
++              device_remove_file(dev, &dev_attr_edge);
++              device_remove_file(dev, &dev_attr_direction);
+               device_unregister(dev);
+               put_device(dev);
+       }