--- zzzz-none-000/linux-3.10.107/drivers/net/ethernet/sun/sunbmac.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/net/ethernet/sun/sunbmac.c 2021-02-04 17:41:59.000000000 +0000 @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -995,7 +994,6 @@ struct bigmac *bp = netdev_priv(dev); void __iomem *bregs = bp->bregs; struct netdev_hw_addr *ha; - int i; u32 tmp, crc; /* Disable the receiver. The bit self-clears when @@ -1017,10 +1015,7 @@ tmp |= BIGMAC_RXCFG_PMISC; sbus_writel(tmp, bregs + BMAC_RXCFG); } else { - u16 hash_table[4]; - - for (i = 0; i < 4; i++) - hash_table[i] = 0; + u16 hash_table[4] = { 0 }; netdev_for_each_mc_addr(ha, dev) { crc = ether_crc_le(6, ha->addr); @@ -1243,7 +1238,7 @@ static int bigmac_sbus_remove(struct platform_device *op) { - struct bigmac *bp = dev_get_drvdata(&op->dev); + struct bigmac *bp = platform_get_drvdata(op); struct device *parent = op->dev.parent; struct net_device *net_dev = bp->dev; struct platform_device *qec_op; @@ -1263,8 +1258,6 @@ free_netdev(net_dev); - dev_set_drvdata(&op->dev, NULL); - return 0; } @@ -1280,7 +1273,6 @@ static struct platform_driver bigmac_sbus_driver = { .driver = { .name = "sunbmac", - .owner = THIS_MODULE, .of_match_table = bigmac_sbus_match, }, .probe = bigmac_sbus_probe,