From: Jon Mason Date: Wed, 4 Sep 2013 18:26:01 +0000 (-0700) Subject: icplus: Use netif_running to determine device state X-Git-Tag: submit/tizen/20141203.153721~1569^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dfafb73f355940989507c56b9282773132e86a9f;p=platform%2Fkernel%2Flinux-arm64.git icplus: Use netif_running to determine device state Remove the __LINK_STATE_START check to verify the device is running, in favor of netif_running(). netif_running() performs the same check of __LINK_STATE_START, so the code should behave the same. Signed-off-by: Jon Mason Cc: Francois Romieu Cc: Sorbica Shieh Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/icplus/ipg.c b/drivers/net/ethernet/icplus/ipg.c index 1fde90b9668..bdf5023724e 100644 --- a/drivers/net/ethernet/icplus/ipg.c +++ b/drivers/net/ethernet/icplus/ipg.c @@ -1004,7 +1004,7 @@ static struct net_device_stats *ipg_nic_get_stats(struct net_device *dev) /* Check to see if the NIC has been initialized via nic_open, * before trying to read statistic registers. */ - if (!test_bit(__LINK_STATE_START, &dev->state)) + if (!netif_running(dev)) return &sp->stats; sp->stats.rx_packets += ipg_r32(IPG_FRAMESRCVDOK);