wpan-phy: follow usual patter of devices registration

Follow the usual pattern of devices registration by adding new function
(wpan_phy_set_dev) that sets child->parent relationship and removing
parent argument from wpan_phy_register call.

Signed-off-by: Dmitry Eremin-Solenikov <[email protected]>
This commit is contained in:
Dmitry Eremin-Solenikov 2009-09-28 19:01:20 +04:00
commit e9cf356c0c
3 changed files with 8 additions and 5 deletions

View file

@ -372,11 +372,12 @@ static int __devinit ieee802154fake_probe(struct platform_device *pdev)
goto out;
}
wpan_phy_set_dev(phy, &pdev->dev);
SET_NETDEV_DEV(dev, &phy->dev);
platform_set_drvdata(pdev, dev);
err = wpan_phy_register(&pdev->dev, phy);
err = wpan_phy_register(phy);
if (err)
goto out;