--- zzzz-none-000/linux-3.10.107/drivers/net/ethernet/cirrus/ep93xx_eth.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/net/ethernet/cirrus/ep93xx_eth.c 2021-02-04 17:41:59.000000000 +0000 @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -476,8 +475,7 @@ if (d) dma_unmap_single(dev, d, PKT_BUF_SIZE, DMA_FROM_DEVICE); - if (ep->rx_buf[i] != NULL) - kfree(ep->rx_buf[i]); + kfree(ep->rx_buf[i]); } for (i = 0; i < TX_QUEUE_ENTRIES; i++) { @@ -487,8 +485,7 @@ if (d) dma_unmap_single(dev, d, PKT_BUF_SIZE, DMA_TO_DEVICE); - if (ep->tx_buf[i] != NULL) - kfree(ep->tx_buf[i]); + kfree(ep->tx_buf[i]); } dma_free_coherent(dev, sizeof(struct ep93xx_descs), ep->descs, @@ -783,7 +780,6 @@ dev = platform_get_drvdata(pdev); if (dev == NULL) return 0; - platform_set_drvdata(pdev, NULL); ep = netdev_priv(dev); @@ -815,7 +811,7 @@ if (pdev == NULL) return -ENODEV; - data = pdev->dev.platform_data; + data = dev_get_platdata(&pdev->dev); mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); irq = platform_get_irq(pdev, 0); @@ -883,7 +879,6 @@ .remove = ep93xx_eth_remove, .driver = { .name = "ep93xx-eth", - .owner = THIS_MODULE, }, };