net: phy: mdio-octeon: use platform_set_drvdata()
authorLibo Chen <libo.chen@huawei.com>
Wed, 21 Aug 2013 10:15:15 +0000 (18:15 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Aug 2013 03:51:11 +0000 (20:51 -0700)
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_set_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio-octeon.c

index b51fa1f..7f18f80 100644 (file)
@@ -222,7 +222,7 @@ static int octeon_mdiobus_probe(struct platform_device *pdev)
        bus->mii_bus->read = octeon_mdiobus_read;
        bus->mii_bus->write = octeon_mdiobus_write;
 
-       dev_set_drvdata(&pdev->dev, bus);
+       platform_set_drvdata(pdev, bus);
 
        err = of_mdiobus_register(bus->mii_bus, pdev->dev.of_node);
        if (err)