aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti/davinci_mdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/ti/davinci_mdio.c')
-rw-r--r--drivers/net/ethernet/ti/davinci_mdio.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index 16ddfc348062..4ec92659a100 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -314,7 +314,7 @@ static int davinci_mdio_probe_dt(struct mdio_platform_data *data,
314 314
315static int davinci_mdio_probe(struct platform_device *pdev) 315static int davinci_mdio_probe(struct platform_device *pdev)
316{ 316{
317 struct mdio_platform_data *pdata = pdev->dev.platform_data; 317 struct mdio_platform_data *pdata = dev_get_platdata(&pdev->dev);
318 struct device *dev = &pdev->dev; 318 struct device *dev = &pdev->dev;
319 struct davinci_mdio_data *data; 319 struct davinci_mdio_data *data;
320 struct resource *res; 320 struct resource *res;
@@ -421,8 +421,7 @@ bail_out:
421 421
422static int davinci_mdio_remove(struct platform_device *pdev) 422static int davinci_mdio_remove(struct platform_device *pdev)
423{ 423{
424 struct device *dev = &pdev->dev; 424 struct davinci_mdio_data *data = platform_get_drvdata(pdev);
425 struct davinci_mdio_data *data = dev_get_drvdata(dev);
426 425
427 if (data->bus) { 426 if (data->bus) {
428 mdiobus_unregister(data->bus); 427 mdiobus_unregister(data->bus);
@@ -434,8 +433,6 @@ static int davinci_mdio_remove(struct platform_device *pdev)
434 pm_runtime_put_sync(&pdev->dev); 433 pm_runtime_put_sync(&pdev->dev);
435 pm_runtime_disable(&pdev->dev); 434 pm_runtime_disable(&pdev->dev);
436 435
437 dev_set_drvdata(dev, NULL);
438
439 kfree(data); 436 kfree(data);
440 437
441 return 0; 438 return 0;