]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Jul 2014 01:12:08 +0000 (18:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Jul 2014 01:12:08 +0000 (18:12 -0700)
added patches:
platform_get_irq-revert-to-platform_get_resource-if-of_irq_get-fails.patch

queue-3.15/platform_get_irq-revert-to-platform_get_resource-if-of_irq_get-fails.patch [new file with mode: 0644]
queue-3.15/series

diff --git a/queue-3.15/platform_get_irq-revert-to-platform_get_resource-if-of_irq_get-fails.patch b/queue-3.15/platform_get_irq-revert-to-platform_get_resource-if-of_irq_get-fails.patch
new file mode 100644 (file)
index 0000000..85a5865
--- /dev/null
@@ -0,0 +1,55 @@
+From aff008ad813c7cf3cfe7b532e7ba2c526c136f22 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Tue, 17 Jun 2014 15:51:02 -0700
+Subject: platform_get_irq: Revert to platform_get_resource if of_irq_get fails
+
+From: Guenter Roeck <linux@roeck-us.net>
+
+commit aff008ad813c7cf3cfe7b532e7ba2c526c136f22 upstream.
+
+Commits 9ec36ca (of/irq: do irq resolution in platform_get_irq)
+and ad69674 (of/irq: do irq resolution in platform_get_irq_byname)
+change the semantics of platform_get_irq and platform_get_irq_byname
+to always rely on devicetree information if devicetree is enabled
+and if a devicetree node is attached to the device. The functions
+now return an error if the devicetree data does not include interrupt
+information, even if the information is available as platform resource
+data.
+
+This causes mfd client drivers to fail if the interrupt number is
+passed via platform resources. Therefore, if of_irq_get fails, try
+platform_get_resource as method of last resort. This restores the
+original functionality for drivers depending on platform resources
+to get irq information.
+
+Cc: Russell King <linux@arm.linux.org.uk>
+Cc: Tony Lindgren <tony@atomide.com>
+Cc: Grant Likely <grant.likely@linaro.org>
+Cc: Grygorii Strashko <grygorii.strashko@ti.com>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Rob Herring <robh@kernel.org>
+[ Guenter Roeck: backported to 3.15 ]
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+
+---
+ drivers/base/platform.c |    9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/drivers/base/platform.c
++++ b/drivers/base/platform.c
+@@ -89,8 +89,13 @@ int platform_get_irq(struct platform_dev
+       return dev->archdata.irqs[num];
+ #else
+       struct resource *r;
+-      if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node)
+-              return of_irq_get(dev->dev.of_node, num);
++      if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) {
++              int ret;
++
++              ret = of_irq_get(dev->dev.of_node, num);
++              if (ret >= 0 || ret == -EPROBE_DEFER)
++                      return ret;
++      }
+       r = platform_get_resource(dev, IORESOURCE_IRQ, num);
index 7eb9d8e56c7d8deb77a2545c2ff3df5a04874b17..50f48583b30819af2234b9f89193273909d06b5d 100644 (file)
@@ -34,3 +34,4 @@ fix-gcc-4.9.0-miscompilation-of-load_balance-in-scheduler.patch
 hwrng-virtio-ensure-reads-happen-after-successful-probe.patch
 mm-do-not-call-do_fault_around-for-non-linear-fault.patch
 nl80211-move-set_qos_map-command-into-split-state.patch
+platform_get_irq-revert-to-platform_get_resource-if-of_irq_get-fails.patch