net: ethernet: mediatek: fixed that initializing u64_stats_sync is missing
authorsean.wang@mediatek.com <sean.wang@mediatek.com>
Sat, 13 Aug 2016 11:16:18 +0000 (19:16 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Aug 2016 21:58:38 +0000 (14:58 -0700)
To fix runtime warning with lockdep is enabled due that u64_stats_sync
is not initialized well, so add it.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c

index b57ae3a..fe17f8c 100644 (file)
@@ -1751,6 +1751,7 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
                goto free_netdev;
        }
        spin_lock_init(&mac->hw_stats->stats_lock);
+       u64_stats_init(&mac->hw_stats->syncp);
        mac->hw_stats->reg_offset = id * MTK_STAT_OFFSET;
 
        SET_NETDEV_DEV(eth->netdev[id], eth->dev);