]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
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 b57ae3afb994ab0dde3b22831af841bbec063081..fe17f8cee16b10b44e38aa134afd470cc35e9ffe 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);