aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/atm/atm_sysfs.c2
-rw-r--r--net/bluetooth/hci_sysfs.c7
-rw-r--r--net/core/net-sysfs.c2
-rw-r--r--net/dsa/slave.c2
-rw-r--r--net/rfkill/rfkill.c5
-rw-r--r--net/wireless/core.c3
6 files changed, 9 insertions, 12 deletions
diff --git a/net/atm/atm_sysfs.c b/net/atm/atm_sysfs.c
index 1b88311f2130..b5674dc2083d 100644
--- a/net/atm/atm_sysfs.c
+++ b/net/atm/atm_sysfs.c
@@ -149,7 +149,7 @@ int atm_register_sysfs(struct atm_dev *adev)
149 cdev->class = &atm_class; 149 cdev->class = &atm_class;
150 dev_set_drvdata(cdev, adev); 150 dev_set_drvdata(cdev, adev);
151 151
152 snprintf(cdev->bus_id, BUS_ID_SIZE, "%s%d", adev->type, adev->number); 152 dev_set_name(cdev, "%s%d", adev->type, adev->number);
153 err = device_register(cdev); 153 err = device_register(cdev);
154 if (err < 0) 154 if (err < 0)
155 return err; 155 return err;
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index f4f6615cad9f..f2bbb2f65434 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -113,8 +113,7 @@ void hci_conn_add_sysfs(struct hci_conn *conn)
113 conn->dev.class = bt_class; 113 conn->dev.class = bt_class;
114 conn->dev.parent = &hdev->dev; 114 conn->dev.parent = &hdev->dev;
115 115
116 snprintf(conn->dev.bus_id, BUS_ID_SIZE, "%s:%d", 116 dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle);
117 hdev->name, conn->handle);
118 117
119 dev_set_drvdata(&conn->dev, conn); 118 dev_set_drvdata(&conn->dev, conn);
120 119
@@ -132,7 +131,7 @@ void hci_conn_add_sysfs(struct hci_conn *conn)
132 */ 131 */
133static int __match_tty(struct device *dev, void *data) 132static int __match_tty(struct device *dev, void *data)
134{ 133{
135 return !strncmp(dev->bus_id, "rfcomm", 6); 134 return !strncmp(dev_name(dev), "rfcomm", 6);
136} 135}
137 136
138static void del_conn(struct work_struct *work) 137static void del_conn(struct work_struct *work)
@@ -421,7 +420,7 @@ int hci_register_sysfs(struct hci_dev *hdev)
421 dev->class = bt_class; 420 dev->class = bt_class;
422 dev->parent = hdev->parent; 421 dev->parent = hdev->parent;
423 422
424 strlcpy(dev->bus_id, hdev->name, BUS_ID_SIZE); 423 dev_set_name(dev, hdev->name);
425 424
426 dev_set_drvdata(dev, hdev); 425 dev_set_drvdata(dev, hdev);
427 426
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 85cb8bdcfb8f..146dcfeb060e 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -494,7 +494,7 @@ int netdev_register_kobject(struct net_device *net)
494 dev->groups = groups; 494 dev->groups = groups;
495 495
496 BUILD_BUG_ON(BUS_ID_SIZE < IFNAMSIZ); 496 BUILD_BUG_ON(BUS_ID_SIZE < IFNAMSIZ);
497 strlcpy(dev->bus_id, net->name, BUS_ID_SIZE); 497 dev_set_name(dev, net->name);
498 498
499#ifdef CONFIG_SYSFS 499#ifdef CONFIG_SYSFS
500 *groups++ = &netstat_group; 500 *groups++ = &netstat_group;
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 37616884b8a9..7384bad81652 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -284,7 +284,7 @@ dsa_slave_create(struct dsa_switch *ds, struct device *parent,
284 netif_carrier_off(slave_dev); 284 netif_carrier_off(slave_dev);
285 285
286 if (p->phy != NULL) { 286 if (p->phy != NULL) {
287 phy_attach(slave_dev, p->phy->dev.bus_id, 287 phy_attach(slave_dev, dev_name(&p->phy->dev),
288 0, PHY_INTERFACE_MODE_GMII); 288 0, PHY_INTERFACE_MODE_GMII);
289 289
290 p->phy->autoneg = AUTONEG_ENABLE; 290 p->phy->autoneg = AUTONEG_ENABLE;
diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c
index 69f3a3b4dd61..ec26eae8004d 100644
--- a/net/rfkill/rfkill.c
+++ b/net/rfkill/rfkill.c
@@ -774,7 +774,7 @@ static void rfkill_led_trigger_register(struct rfkill *rfkill)
774 int error; 774 int error;
775 775
776 if (!rfkill->led_trigger.name) 776 if (!rfkill->led_trigger.name)
777 rfkill->led_trigger.name = rfkill->dev.bus_id; 777 rfkill->led_trigger.name = dev_name(&rfkill->dev);
778 if (!rfkill->led_trigger.activate) 778 if (!rfkill->led_trigger.activate)
779 rfkill->led_trigger.activate = rfkill_led_trigger_activate; 779 rfkill->led_trigger.activate = rfkill_led_trigger_activate;
780 error = led_trigger_register(&rfkill->led_trigger); 780 error = led_trigger_register(&rfkill->led_trigger);
@@ -815,8 +815,7 @@ int __must_check rfkill_register(struct rfkill *rfkill)
815 "badly initialized rfkill struct\n")) 815 "badly initialized rfkill struct\n"))
816 return -EINVAL; 816 return -EINVAL;
817 817
818 snprintf(dev->bus_id, sizeof(dev->bus_id), 818 dev_set_name(dev, "rfkill%ld", (long)atomic_inc_return(&rfkill_no) - 1);
819 "rfkill%ld", (long)atomic_inc_return(&rfkill_no) - 1);
820 819
821 rfkill_led_trigger_register(rfkill); 820 rfkill_led_trigger_register(rfkill);
822 821
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 72825afe2bf6..39e3d10fccde 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -236,8 +236,7 @@ struct wiphy *wiphy_new(struct cfg80211_ops *ops, int sizeof_priv)
236 mutex_unlock(&cfg80211_drv_mutex); 236 mutex_unlock(&cfg80211_drv_mutex);
237 237
238 /* give it a proper name */ 238 /* give it a proper name */
239 snprintf(drv->wiphy.dev.bus_id, BUS_ID_SIZE, 239 dev_set_name(&drv->wiphy.dev, PHY_NAME "%d", drv->idx);
240 PHY_NAME "%d", drv->idx);
241 240
242 mutex_init(&drv->mtx); 241 mutex_init(&drv->mtx);
243 mutex_init(&drv->devlist_mtx); 242 mutex_init(&drv->devlist_mtx);