From 6e05d6c4676408b46b01eef29fd472b89ba1f98a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 21 Jul 2008 20:03:34 -0700 Subject: device create: net: convert device_create_drvdata to device_create Now that device_create() has been audited, rename things back to the original call to be sane. Cc: Jeff Garzik Signed-off-by: Greg Kroah-Hartman --- drivers/net/ppp_generic.c | 4 ++-- drivers/net/wan/cosa.c | 4 ++-- drivers/net/wireless/mac80211_hwsim.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 0ca0fcbb7c0..03d027c6887 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c @@ -866,8 +866,8 @@ static int __init ppp_init(void) err = PTR_ERR(ppp_class); goto out_chrdev; } - device_create_drvdata(ppp_class, NULL, MKDEV(PPP_MAJOR, 0), - NULL, "ppp"); + device_create(ppp_class, NULL, MKDEV(PPP_MAJOR, 0), NULL, + "ppp"); } out: diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c index f14051556c8..7f97f8d08c3 100644 --- a/drivers/net/wan/cosa.c +++ b/drivers/net/wan/cosa.c @@ -388,8 +388,8 @@ static int __init cosa_init(void) goto out_chrdev; } for (i = 0; i < nr_cards; i++) - device_create_drvdata(cosa_class, NULL, MKDEV(cosa_major, i), - NULL, "cosa%d", i); + device_create(cosa_class, NULL, MKDEV(cosa_major, i), NULL, + "cosa%d", i); err = 0; goto out; diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index c9e4a435b2f..1a019e98dac 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -533,11 +533,11 @@ static int __init init_mac80211_hwsim(void) data = hw->priv; data->hw = hw; - data->dev = device_create_drvdata(hwsim_class, NULL, 0, hw, - "hwsim%d", i); + data->dev = device_create(hwsim_class, NULL, 0, hw, + "hwsim%d", i); if (IS_ERR(data->dev)) { printk(KERN_DEBUG - "mac80211_hwsim: device_create_drvdata " + "mac80211_hwsim: device_create " "failed (%ld)\n", PTR_ERR(data->dev)); err = -ENOMEM; goto failed_drvdata; -- cgit v1.2.3 From 26853ab6f9a4c482be4b638477335704724d4854 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 27 Jan 2008 10:29:20 -0800 Subject: NET: convert the phy_device file to use bus_find_device_by_name The driver core now has this helper function, so might as well use it instead of forcing the phy code to roll their own version. Signed-off-by: Greg Kroah-Hartman --- drivers/net/phy/phy_device.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index f11e900b437..e11b03b2b25 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -309,11 +309,6 @@ void phy_disconnect(struct phy_device *phydev) } EXPORT_SYMBOL(phy_disconnect); -static int phy_compare_id(struct device *dev, void *data) -{ - return strcmp((char *)data, dev->bus_id) ? 0 : 1; -} - /** * phy_attach - attach a network device to a particular PHY device * @dev: network device to attach @@ -337,8 +332,7 @@ struct phy_device *phy_attach(struct net_device *dev, /* Search the list of PHY devices on the mdio bus for the * PHY with the requested name */ - d = bus_find_device(bus, NULL, (void *)bus_id, phy_compare_id); - + d = bus_find_device_by_name(bus, NULL, bus_id); if (d) { phydev = to_phy_device(d); } else { -- cgit v1.2.3