From f8864e46f166436d8a49a51681a95b7122138ca4 Mon Sep 17 00:00:00 2001 From: Kevin Hao Date: Wed, 28 Jan 2015 20:06:48 +0800 Subject: net: gianfar: remove the unneeded check of disabled device 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 Signed-off-by: David S. Miller Change-Id: I3a851a9b6eb649a1fa9694970c6aa34d11f76fda Reviewed-on: http://git.am.freescale.net:8181/32701 Tested-by: Review Code-CDREVIEW Reviewed-by: Honghua Yin diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index b186544..23ac2d3 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -800,7 +800,7 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev) unsigned int num_tx_qs, num_rx_qs; unsigned short mode, poll_mode; - if (!np || !of_device_is_available(np)) + if (!np) return -ENODEV; if (of_device_is_compatible(np, "fsl,etsec2")) { -- cgit v0.10.2