]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 May 2015 16:56:01 +0000 (09:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 May 2015 16:56:01 +0000 (09:56 -0700)
added patches:
gpio-unregister-gpiochip-device-before-removing-it.patch

queue-3.14/gpio-unregister-gpiochip-device-before-removing-it.patch [new file with mode: 0644]
queue-3.14/series

diff --git a/queue-3.14/gpio-unregister-gpiochip-device-before-removing-it.patch b/queue-3.14/gpio-unregister-gpiochip-device-before-removing-it.patch
new file mode 100644 (file)
index 0000000..f78bfe6
--- /dev/null
@@ -0,0 +1,42 @@
+From 01cca93a9491ed95992523ff7e79dd9bfcdea8e0 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Mon, 12 Jan 2015 17:12:29 +0100
+Subject: gpio: unregister gpiochip device before removing it
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 01cca93a9491ed95992523ff7e79dd9bfcdea8e0 upstream.
+
+Unregister gpiochip device (used to export information through sysfs)
+before removing it internally. This way removal will reverse addition.
+
+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 |    5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpio/gpiolib.c
++++ b/drivers/gpio/gpiolib.c
+@@ -1265,6 +1265,8 @@ int gpiochip_remove(struct gpio_chip *ch
+       int             status = 0;
+       unsigned        id;
++      gpiochip_unexport(chip);
++
+       spin_lock_irqsave(&gpio_lock, flags);
+       gpiochip_remove_pin_ranges(chip);
+@@ -1286,9 +1288,6 @@ int gpiochip_remove(struct gpio_chip *ch
+       spin_unlock_irqrestore(&gpio_lock, flags);
+-      if (status == 0)
+-              gpiochip_unexport(chip);
+-
+       return status;
+ }
+ EXPORT_SYMBOL_GPL(gpiochip_remove);
index 997c8bcc9b9302fcb64bcdef8483d852b12f14af..8a36d410f950d1f026faf432a728653677265704 100644 (file)
@@ -1,6 +1,7 @@
 ocfs2-dlm-fix-race-between-purge-and-get-lock-resource.patch
 nilfs2-fix-sanity-check-of-btree-level-in-nilfs_btree_root_broken.patch
 rdma-cma-canonize-ipv4-on-ipv6-sockets-properly.patch
+gpio-unregister-gpiochip-device-before-removing-it.patch
 gpio-sysfs-fix-memory-leaks-and-device-hotplug.patch
 mnt-fix-fs_fully_visible-to-verify-the-root-directory-is-visible.patch
 mm-memory-failure-call-shake_page-when-error-hits-thp-tail-page.patch