Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Daniel Mack and committed by
David S. Miller
47cb0355 bef28b11

+9 -5
+9 -5
drivers/net/ax88796.c
··· 93 93 94 94 unsigned char running; 95 95 unsigned char resume_open; 96 + unsigned int irqflags; 96 97 97 98 u32 reg_offsets[0x20]; 98 99 }; ··· 475 474 476 475 dev_dbg(&ax->dev->dev, "%s: open\n", dev->name); 477 476 478 - ret = request_irq(dev->irq, ax_ei_interrupt, 0, dev->name, dev); 477 + ret = request_irq(dev->irq, ax_ei_interrupt, ax->irqflags, 478 + dev->name, dev); 479 479 if (ret) 480 480 return ret; 481 481 ··· 831 829 struct ax_device *ax; 832 830 struct resource *res; 833 831 size_t size; 834 - int ret; 832 + int ret = 0; 835 833 836 834 dev = ax__alloc_ei_netdev(sizeof(struct ax_device)); 837 835 if (dev == NULL) ··· 852 850 853 851 /* find the platform resources */ 854 852 855 - ret = platform_get_irq(pdev, 0); 856 - if (ret < 0) { 853 + res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 854 + if (res == NULL) { 857 855 dev_err(&pdev->dev, "no IRQ specified\n"); 858 856 goto exit_mem; 859 857 } 860 - dev->irq = ret; 858 + 859 + dev->irq = res->start; 860 + ax->irqflags = res->flags & IRQF_TRIGGER_MASK; 861 861 862 862 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 863 863 if (res == NULL) {