diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-08 07:02:17 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-02-09 10:37:53 -0500 |
commit | e556fdbde38f68d87f689473b112cc65ddacd6a4 (patch) | |
tree | 2a0e64f5002a565066dcf1a655b4df40daf16fa1 /drivers/net/irda | |
parent | d32386086b4a250bd71125f8d760cfffada0e422 (diff) |
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.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c index 149a3b4aaec..2f5bf0bc845 100644 --- a/drivers/net/irda/sa1100_ir.c +++ b/drivers/net/irda/sa1100_ir.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <net/irda/wrapper.h> | 35 | #include <net/irda/wrapper.h> |
36 | #include <net/irda/irda_device.h> | 36 | #include <net/irda/irda_device.h> |
37 | 37 | ||
38 | #include <asm/irq.h> | ||
39 | #include <mach/dma.h> | 38 | #include <mach/dma.h> |
40 | #include <mach/hardware.h> | 39 | #include <mach/hardware.h> |
41 | #include <asm/mach/irda.h> | 40 | #include <asm/mach/irda.h> |
@@ -900,11 +899,15 @@ static int sa1100_irda_probe(struct platform_device *pdev) | |||
900 | struct net_device *dev; | 899 | struct net_device *dev; |
901 | struct sa1100_irda *si; | 900 | struct sa1100_irda *si; |
902 | unsigned int baudrate_mask; | 901 | unsigned int baudrate_mask; |
903 | int err; | 902 | int err, irq; |
904 | 903 | ||
905 | if (!pdev->dev.platform_data) | 904 | if (!pdev->dev.platform_data) |
906 | return -EINVAL; | 905 | return -EINVAL; |
907 | 906 | ||
907 | irq = platform_get_irq(pdev, 0); | ||
908 | if (irq <= 0) | ||
909 | return irq < 0 ? irq : -ENXIO; | ||
910 | |||
908 | err = request_mem_region(__PREG(Ser2UTCR0), 0x24, "IrDA") ? 0 : -EBUSY; | 911 | err = request_mem_region(__PREG(Ser2UTCR0), 0x24, "IrDA") ? 0 : -EBUSY; |
909 | if (err) | 912 | if (err) |
910 | goto err_mem_1; | 913 | goto err_mem_1; |
@@ -936,7 +939,7 @@ static int sa1100_irda_probe(struct platform_device *pdev) | |||
936 | goto err_mem_5; | 939 | goto err_mem_5; |
937 | 940 | ||
938 | dev->netdev_ops = &sa1100_irda_netdev_ops; | 941 | dev->netdev_ops = &sa1100_irda_netdev_ops; |
939 | dev->irq = IRQ_Ser2ICP; | 942 | dev->irq = irq; |
940 | 943 | ||
941 | irda_init_max_qos_capabilies(&si->qos); | 944 | irda_init_max_qos_capabilies(&si->qos); |
942 | 945 | ||