aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/platform.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-14 18:01:02 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-14 18:01:02 -0500
commitecdca043ebe8e3172e0400d0966831e2e60870a0 (patch)
treec1433e2399f544970e1f9ae7a469dbc9172c8e9f /drivers/base/platform.c
parentbb3215e97bb1ab917ed858322a9399fb32e69e49 (diff)
parent77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff)
Merge 3.7-rc5 into driver-core-next
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r--drivers/base/platform.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index af1d47f0e99d..1e8f65420db7 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -83,9 +83,16 @@ EXPORT_SYMBOL_GPL(platform_get_resource);
83 */ 83 */
84int platform_get_irq(struct platform_device *dev, unsigned int num) 84int platform_get_irq(struct platform_device *dev, unsigned int num)
85{ 85{
86#ifdef CONFIG_SPARC
87 /* sparc does not have irqs represented as IORESOURCE_IRQ resources */
88 if (!dev || num >= dev->archdata.num_irqs)
89 return -ENXIO;
90 return dev->archdata.irqs[num];
91#else
86 struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ, num); 92 struct resource *r = platform_get_resource(dev, IORESOURCE_IRQ, num);
87 93
88 return r ? r->start : -ENXIO; 94 return r ? r->start : -ENXIO;
95#endif
89} 96}
90EXPORT_SYMBOL_GPL(platform_get_irq); 97EXPORT_SYMBOL_GPL(platform_get_irq);
91 98