netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: gianfar: remove the unneeded check of disabled device
@ 2015-01-28 12:06 Kevin Hao
  2015-01-29 22:51 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Hao @ 2015-01-28 12:06 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Claudiu Manoil

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>
---
 drivers/net/ethernet/freescale/gianfar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 93ff846e96f1..43df78882e48 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -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")) {
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: gianfar: remove the unneeded check of disabled device
  2015-01-28 12:06 [PATCH net-next] net: gianfar: remove the unneeded check of disabled device Kevin Hao
@ 2015-01-29 22:51 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-01-29 22:51 UTC (permalink / raw)
  To: haokexin; +Cc: netdev, claudiu.manoil

From: Kevin Hao <haokexin@gmail.com>
Date: Wed, 28 Jan 2015 20:06:48 +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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-29 22:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-28 12:06 [PATCH net-next] net: gianfar: remove the unneeded check of disabled device Kevin Hao
2015-01-29 22:51 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).