Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: mdio-mux-bcm-iproc: simplify getting .driver_data

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@sang-engineering.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Wolfram Sang and committed by
David S. Miller
2c67e33d 44f5ccdb

+2 -4
+2 -4
drivers/net/phy/mdio-mux-bcm-iproc.c
··· 289 289 #ifdef CONFIG_PM_SLEEP 290 290 static int mdio_mux_iproc_suspend(struct device *dev) 291 291 { 292 - struct platform_device *pdev = to_platform_device(dev); 293 - struct iproc_mdiomux_desc *md = platform_get_drvdata(pdev); 292 + struct iproc_mdiomux_desc *md = dev_get_drvdata(dev); 294 293 295 294 clk_disable_unprepare(md->core_clk); 296 295 ··· 298 299 299 300 static int mdio_mux_iproc_resume(struct device *dev) 300 301 { 301 - struct platform_device *pdev = to_platform_device(dev); 302 - struct iproc_mdiomux_desc *md = platform_get_drvdata(pdev); 302 + struct iproc_mdiomux_desc *md = dev_get_drvdata(dev); 303 303 304 304 clk_prepare_enable(md->core_clk); 305 305 mdio_mux_iproc_config(md);