[PATCH 7/9] net: mdio: mdio-bcm-iproc: simplify getting .driver_data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We should get 'driver_data' from 'struct device' directly. Going via
platform_device is an unneeded step back and forth.

Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
---

Build tested only. buildbot is happy.

 drivers/net/mdio/mdio-bcm-iproc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/mdio/mdio-bcm-iproc.c b/drivers/net/mdio/mdio-bcm-iproc.c
index 77fc970cdfde..5666cfab15b9 100644
--- a/drivers/net/mdio/mdio-bcm-iproc.c
+++ b/drivers/net/mdio/mdio-bcm-iproc.c
@@ -181,8 +181,7 @@ static int iproc_mdio_remove(struct platform_device *pdev)
 #ifdef CONFIG_PM_SLEEP
 static int iproc_mdio_resume(struct device *dev)
 {
-	struct platform_device *pdev = to_platform_device(dev);
-	struct iproc_mdio_priv *priv = platform_get_drvdata(pdev);
+	struct iproc_mdio_priv *priv = dev_get_drvdata(dev);
 
 	/* restore the mii clock configuration */
 	iproc_mdio_config_clk(priv->base);
-- 
2.30.2




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux