]> git.baikalelectronics.ru Git - kernel.git/commit
net/smsc911x: fix irq resource allocation failure
authorKamlakant Patel <kamlakant.patel@broadcom.com>
Mon, 4 May 2015 09:09:49 +0000 (14:39 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 May 2015 19:10:41 +0000 (15:10 -0400)
commit2a97edde8eaa12f770d6cbbc0ef0fd8a6574df5f
tree8b0a1b1a851551711af32842b4b606b7fccde0ca
parent01e96a09b270c4ca321e8cb84251b27cb11db69b
net/smsc911x: fix irq resource allocation failure

When smsc911x uses GPIO as the interrupt controller, and if both are
loaded as modules, we get following error:

"smsc911x: Could not allocate irq resource"

This issue is because of smsc911x using platform_get_resource to get
device tree based irq resource.

commit "a768104 (of/irq: do irq resolution in platform_get_irq)" and
commit "7085a7 (drivers: platform: parse IRQ flags from resources)" add
support in platform_get_irq to resolve irq and irq_flags respectively
for both modern device tree and legacy static platform data platforms.

Modify smsc911x driver to use platform_get_irq to pick up irq resource
correctly and use irq_get_trigger_type to get the IRQ trigger flags.

Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/smsc/smsc911x.c