Commit f47d5bb0 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'driver-core-3.16-rc6' of...

Merge tag 'driver-core-3.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fix from Greg KH:
 "Here is a single driver core fix that reverts an older patch that has
  been causing a number of reported problems with the platform devices.

  This revert has been in linux-next for a while with no reported issues"

* tag 'driver-core-3.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  platform_get_irq: Revert to platform_get_resource if of_irq_get fails
parents fa24615f aff008ad
...@@ -89,8 +89,13 @@ int platform_get_irq(struct platform_device *dev, unsigned int num) ...@@ -89,8 +89,13 @@ int platform_get_irq(struct platform_device *dev, unsigned int num)
return dev->archdata.irqs[num]; return dev->archdata.irqs[num];
#else #else
struct resource *r; struct resource *r;
if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) {
return of_irq_get(dev->dev.of_node, num); 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); r = platform_get_resource(dev, IORESOURCE_IRQ, num);
...@@ -133,8 +138,13 @@ int platform_get_irq_byname(struct platform_device *dev, const char *name) ...@@ -133,8 +138,13 @@ int platform_get_irq_byname(struct platform_device *dev, const char *name)
{ {
struct resource *r; struct resource *r;
if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) {
return of_irq_get_byname(dev->dev.of_node, name); int ret;
ret = of_irq_get_byname(dev->dev.of_node, name);
if (ret >= 0 || ret == -EPROBE_DEFER)
return ret;
}
r = platform_get_resource_byname(dev, IORESOURCE_IRQ, name); r = platform_get_resource_byname(dev, IORESOURCE_IRQ, name);
return r ? r->start : -ENXIO; return r ? r->start : -ENXIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment