]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: gianfar: remove the unneeded check of disabled device
authorKevin Hao <haokexin@gmail.com>
Wed, 28 Jan 2015 12:06:48 +0000 (20:06 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Jan 2015 22:51:11 +0000 (14:51 -0800)
Since commit cd1e65044d44 ("of/device: Don't register disabled
devices"), the disabled device will not be registered at all. So we
don't need to do the check again in the platform device driver.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.c

index 93ff846e96f12b08181a7c59ed8afabc53369cd4..43df78882e484e065706bd04c322fa8276d4c424 100644 (file)
@@ -764,7 +764,7 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)
        u32 *tx_queues, *rx_queues;
        unsigned short mode, poll_mode;
 
-       if (!np || !of_device_is_available(np))
+       if (!np)
                return -ENODEV;
 
        if (of_device_is_compatible(np, "fsl,etsec2")) {