dpaa_eth: fix error in dpaa_remove()
authorMadalin Bucur <madalin.bucur@nxp.com>
Wed, 14 Mar 2018 13:37:29 +0000 (08:37 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Mar 2018 17:16:23 +0000 (13:16 -0400)
The recent changes that make the driver probing compatible with DSA
were not propagated in the dpa_remove() function, breaking the
module unload function. Using the proper device to address the issue.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c

index 7caa8da484217e074a9b7938a220a292b536667a..3af5e0c08233d6e5cdf31860ff5333548a046157 100644 (file)
@@ -2860,7 +2860,7 @@ static int dpaa_remove(struct platform_device *pdev)
        struct device *dev;
        int err;
 
-       dev = &pdev->dev;
+       dev = pdev->dev.parent;
        net_dev = dev_get_drvdata(dev);
 
        priv = netdev_priv(net_dev);