Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360790
b: refs/heads/master
c: b2a4319
h: refs/heads/master
v: v3
  • Loading branch information
Petr Malat authored and David S. Miller committed Feb 28, 2013
1 parent b0a0d16 commit 7947c1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d521de04a73abb5e662c12eafa8c839aaaa6ae4f
refs/heads/master: b2a431915d19893f047e0dd149d0c1b9d2a0b960
10 changes: 6 additions & 4 deletions trunk/drivers/net/phy/phy_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ MODULE_LICENSE("GPL");

void phy_device_free(struct phy_device *phydev)
{
kfree(phydev);
put_device(&phydev->dev);
}
EXPORT_SYMBOL(phy_device_free);

static void phy_device_release(struct device *dev)
{
phy_device_free(to_phy_device(dev));
kfree(to_phy_device(dev));
}

static struct phy_driver genphy_driver;
Expand Down Expand Up @@ -201,6 +201,8 @@ struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id,
there's no driver _already_ loaded. */
request_module(MDIO_MODULE_PREFIX MDIO_ID_FMT, MDIO_ID_ARGS(phy_id));

device_initialize(&dev->dev);

return dev;
}
EXPORT_SYMBOL(phy_device_create);
Expand Down Expand Up @@ -363,9 +365,9 @@ int phy_device_register(struct phy_device *phydev)
/* Run all of the fixups for this PHY */
phy_scan_fixups(phydev);

err = device_register(&phydev->dev);
err = device_add(&phydev->dev);
if (err) {
pr_err("phy %d failed to register\n", phydev->addr);
pr_err("PHY %d failed to add\n", phydev->addr);
goto out;
}

Expand Down

0 comments on commit 7947c1d

Please sign in to comment.