Skip to contentSkip to conversation

net: gianfar: remove the unneeded check of disabled device

PATCH Applied Kevin Hao 2 participants 2 messages Jan 28, 2015 – Jan 29, 2015

Subsystems (3)
lore
Share & tools
lore

Kevin Hao

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/ethernet/freescale/gianfar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/gianfar.c +1 -1
index 93ff846e96f1..43df78882e48 100644
@@ -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")) {
Signature · 1 line
1.9.3
maintainer Applied
#1 lore raw

From: Kevin Hao <[email protected]>
Date: Wed, 28 Jan 2015 20:06:48 +0800

Quoted 5 lines

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.

Applied, thanks.