diff options
author | Daniel Mack <daniel@caiaq.de> | 2009-03-25 02:31:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-25 02:31:22 -0400 |
commit | 47cb035560a41bd1bd3db506eeab93088815203e (patch) | |
tree | c582c6966508203526cb588046af7519779a98cc | |
parent | bef28b11597a4da9ef3b8a51776b8cb14b427e5e (diff) |
drivers/net/ax88796.c: take IRQ flags from platform_device
This patch adds support to the ax88796 ethernet driver to take IRQ flags
given by the platform_device definition.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ax88796.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c index a4eb6c40678c..e7c9748437d4 100644 --- a/drivers/net/ax88796.c +++ b/drivers/net/ax88796.c | |||
@@ -93,6 +93,7 @@ struct ax_device { | |||
93 | 93 | ||
94 | unsigned char running; | 94 | unsigned char running; |
95 | unsigned char resume_open; | 95 | unsigned char resume_open; |
96 | unsigned int irqflags; | ||
96 | 97 | ||
97 | u32 reg_offsets[0x20]; | 98 | u32 reg_offsets[0x20]; |
98 | }; | 99 | }; |
@@ -474,7 +475,8 @@ static int ax_open(struct net_device *dev) | |||
474 | 475 | ||
475 | dev_dbg(&ax->dev->dev, "%s: open\n", dev->name); | 476 | dev_dbg(&ax->dev->dev, "%s: open\n", dev->name); |
476 | 477 | ||
477 | ret = request_irq(dev->irq, ax_ei_interrupt, 0, dev->name, dev); | 478 | ret = request_irq(dev->irq, ax_ei_interrupt, ax->irqflags, |
479 | dev->name, dev); | ||
478 | if (ret) | 480 | if (ret) |
479 | return ret; | 481 | return ret; |
480 | 482 | ||
@@ -829,7 +831,7 @@ static int ax_probe(struct platform_device *pdev) | |||
829 | struct ax_device *ax; | 831 | struct ax_device *ax; |
830 | struct resource *res; | 832 | struct resource *res; |
831 | size_t size; | 833 | size_t size; |
832 | int ret; | 834 | int ret = 0; |
833 | 835 | ||
834 | dev = ax__alloc_ei_netdev(sizeof(struct ax_device)); | 836 | dev = ax__alloc_ei_netdev(sizeof(struct ax_device)); |
835 | if (dev == NULL) | 837 | if (dev == NULL) |
@@ -850,12 +852,14 @@ static int ax_probe(struct platform_device *pdev) | |||
850 | 852 | ||
851 | /* find the platform resources */ | 853 | /* find the platform resources */ |
852 | 854 | ||
853 | ret = platform_get_irq(pdev, 0); | 855 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
854 | if (ret < 0) { | 856 | if (res == NULL) { |
855 | dev_err(&pdev->dev, "no IRQ specified\n"); | 857 | dev_err(&pdev->dev, "no IRQ specified\n"); |
856 | goto exit_mem; | 858 | goto exit_mem; |
857 | } | 859 | } |
858 | dev->irq = ret; | 860 | |
861 | dev->irq = res->start; | ||
862 | ax->irqflags = res->flags & IRQF_TRIGGER_MASK; | ||
859 | 863 | ||
860 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 864 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
861 | if (res == NULL) { | 865 | if (res == NULL) { |