diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-21 13:07:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-21 13:07:25 -0400 |
commit | 90125edbc49ec58b9101c4271bb1d87b04a4620f (patch) | |
tree | 068353d4234435b17ade687b50a5d5015bdf1ad9 /drivers/base/platform.c | |
parent | 0a8adf584759cbcbce5d88d419db01a8d0373abf (diff) | |
parent | 9a3c4145af32125c5ee39c0272662b47307a8323 (diff) |
Merge 3.16-rc6 into driver-core-next
We want the platform changes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r-- | drivers/base/platform.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 148f66a1d49a..7cc7440b014d 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -90,8 +90,13 @@ int platform_get_irq(struct platform_device *dev, unsigned int num) | |||
90 | return dev->archdata.irqs[num]; | 90 | return dev->archdata.irqs[num]; |
91 | #else | 91 | #else |
92 | struct resource *r; | 92 | struct resource *r; |
93 | if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) | 93 | if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) { |
94 | return of_irq_get(dev->dev.of_node, num); | 94 | int ret; |
95 | |||
96 | ret = of_irq_get(dev->dev.of_node, num); | ||
97 | if (ret >= 0 || ret == -EPROBE_DEFER) | ||
98 | return ret; | ||
99 | } | ||
95 | 100 | ||
96 | r = platform_get_resource(dev, IORESOURCE_IRQ, num); | 101 | r = platform_get_resource(dev, IORESOURCE_IRQ, num); |
97 | 102 | ||
@@ -134,8 +139,13 @@ int platform_get_irq_byname(struct platform_device *dev, const char *name) | |||
134 | { | 139 | { |
135 | struct resource *r; | 140 | struct resource *r; |
136 | 141 | ||
137 | if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) | 142 | if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) { |
138 | return of_irq_get_byname(dev->dev.of_node, name); | 143 | int ret; |
144 | |||
145 | ret = of_irq_get_byname(dev->dev.of_node, name); | ||
146 | if (ret >= 0 || ret == -EPROBE_DEFER) | ||
147 | return ret; | ||
148 | } | ||
139 | 149 | ||
140 | r = platform_get_resource_byname(dev, IORESOURCE_IRQ, name); | 150 | r = platform_get_resource_byname(dev, IORESOURCE_IRQ, name); |
141 | return r ? r->start : -ENXIO; | 151 | return r ? r->start : -ENXIO; |