summaryrefslogtreecommitdiffstats
path: root/drivers/net/irda
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-08 12:02:17 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-02-09 15:37:53 +0000
commite556fdbde38f68d87f689473b112cc65ddacd6a4 (patch)
tree2a0e64f5002a565066dcf1a655b4df40daf16fa1 /drivers/net/irda
parentd32386086b4a250bd71125f8d760cfffada0e422 (diff)
downloadlinux-e556fdbde38f68d87f689473b112cc65ddacd6a4.tar.bz2
NET: sa11x0-ir: obtain interrupt number from platform resources
Convert the sa11x0-ir driver to obtain its interrupt number from the platform device resources, rather than via the asm/irq.h include. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/net/irda')
-rw-r--r--drivers/net/irda/sa1100_ir.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
index 149a3b4aaecc..2f5bf0bc8458 100644
--- a/drivers/net/irda/sa1100_ir.c
+++ b/drivers/net/irda/sa1100_ir.c
@@ -35,7 +35,6 @@
#include <net/irda/wrapper.h>
#include <net/irda/irda_device.h>
-#include <asm/irq.h>
#include <mach/dma.h>
#include <mach/hardware.h>
#include <asm/mach/irda.h>
@@ -900,11 +899,15 @@ static int sa1100_irda_probe(struct platform_device *pdev)
struct net_device *dev;
struct sa1100_irda *si;
unsigned int baudrate_mask;
- int err;
+ int err, irq;
if (!pdev->dev.platform_data)
return -EINVAL;
+ irq = platform_get_irq(pdev, 0);
+ if (irq <= 0)
+ return irq < 0 ? irq : -ENXIO;
+
err = request_mem_region(__PREG(Ser2UTCR0), 0x24, "IrDA") ? 0 : -EBUSY;
if (err)
goto err_mem_1;
@@ -936,7 +939,7 @@ static int sa1100_irda_probe(struct platform_device *pdev)
goto err_mem_5;
dev->netdev_ops = &sa1100_irda_netdev_ops;
- dev->irq = IRQ_Ser2ICP;
+ dev->irq = irq;
irda_init_max_qos_capabilies(&si->qos);