Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfd93c97 authored by Jingoo Han's avatar Jingoo Han Committed by David S. Miller
Browse files

net: ethernet: remove unnecessary platform_set_drvdata()



The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d063
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: default avatarRob Herring <rob.herring@calxeda.com>
Acked-by: default avatarRoland Stigge <stigge@antcom.de>
Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Tested-by: default avatarRoland Stigge <stigge@antcom.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3acfeac3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -849,7 +849,6 @@ static int ne_drv_remove(struct platform_device *pdev)
		free_irq(dev->irq, dev);
		release_region(dev->base_addr, NE_IO_EXTENT);
		free_netdev(dev);
		platform_set_drvdata(pdev, NULL);
	}
	return 0;
}
+0 −4
Original line number Diff line number Diff line
@@ -1719,7 +1719,6 @@ static int bfin_mac_probe(struct platform_device *pdev)
	mdiobus_unregister(lp->mii_bus);
	mdiobus_free(lp->mii_bus);
out_err_probe_mac:
	platform_set_drvdata(pdev, NULL);
	free_netdev(ndev);

	return rc;
@@ -1732,8 +1731,6 @@ static int bfin_mac_remove(struct platform_device *pdev)

	bfin_phc_release(lp);

	platform_set_drvdata(pdev, NULL);

	lp->mii_bus->priv = NULL;

	unregister_netdev(ndev);
@@ -1868,7 +1865,6 @@ static int bfin_mii_bus_remove(struct platform_device *pdev)
	struct bfin_mii_bus_platform_data *mii_bus_pd =
		dev_get_platdata(&pdev->dev);

	platform_set_drvdata(pdev, NULL);
	mdiobus_unregister(miibus);
	kfree(miibus->irq);
	mdiobus_free(miibus);
+0 −2
Original line number Diff line number Diff line
@@ -1301,8 +1301,6 @@ static int au1000_remove(struct platform_device *pdev)
	int i;
	struct resource *base, *macen;

	platform_set_drvdata(pdev, NULL);

	unregister_netdev(dev);
	mdiobus_unregister(aup->mii_bus);
	mdiobus_free(aup->mii_bus);
+0 −1
Original line number Diff line number Diff line
@@ -1847,7 +1847,6 @@ static int bcm_enet_remove(struct platform_device *pdev)
	clk_disable_unprepare(priv->mac_clk);
	clk_put(priv->mac_clk);

	platform_set_drvdata(pdev, NULL);
	free_netdev(dev);
	return 0;
}
+0 −1
Original line number Diff line number Diff line
@@ -435,7 +435,6 @@ static int at91ether_remove(struct platform_device *pdev)
	unregister_netdev(dev);
	clk_disable(lp->pclk);
	free_netdev(dev);
	platform_set_drvdata(pdev, NULL);

	return 0;
}
Loading