net: mdio-mux: bcm-iproc: fix wrong getter and setter pair
mdio_mux_iproc_probe() uses platform_set_drvdata() to store md pointer
in device, whereas mdio_mux_iproc_remove() restores md pointer by
dev_get_platdata(&pdev->dev). This leads to wrong resources release.
The patch replaces getter to platform_get_drvdata.
Fixes: 98bc865a1e
("net: mdio-mux: Add MDIO mux driver for iProc SoCs")
Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9fc12023d6
commit
b0753408aa
|
@ -218,7 +218,7 @@ static int mdio_mux_iproc_probe(struct platform_device *pdev)
|
|||
|
||||
static int mdio_mux_iproc_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct iproc_mdiomux_desc *md = dev_get_platdata(&pdev->dev);
|
||||
struct iproc_mdiomux_desc *md = platform_get_drvdata(pdev);
|
||||
|
||||
mdio_mux_uninit(md->mux_handle);
|
||||
mdiobus_unregister(md->mii_bus);
|
||||
|
|
Loading…
Reference in New Issue