]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00270996 net:fec: fix fec probe fail due to gpio_irq check error
authorFugang Duan <B38611@freescale.com>
Mon, 15 Jul 2013 05:41:03 +0000 (13:41 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:14:13 +0000 (14:14 +0200)
Board files correctly define fec gpio irq to wake up wait mode since FEC
interrupt cannot connect to GPC, otherwise board files define fec gpio irq
to -1. So, fec probe function check the gpio irq to decide whether fec use
gpio irq or fec irq.

Current irq checking logic is incorrect. Correct the gpio irq checking.

Signed-off-by: Fugang Duan <B38611@freescale.com>
drivers/net/fec.c

index 50fe80109bab70d4db81790d60682f6254a292af..71e0abc56216eee8036721a35f61dc2894f761dc 100755 (executable)
@@ -1867,7 +1867,7 @@ fec_probe(struct platform_device *pdev)
        if (pdata)
                fep->phy_interface = pdata->phy;
 
-       if (pdata->gpio_irq < 0) {
+       if (pdata->gpio_irq > 0) {
                gpio_request(pdata->gpio_irq, "gpio_enet_irq");
                gpio_direction_input(pdata->gpio_irq);