aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/hci_sysfs.c')
-rw-r--r--net/bluetooth/hci_sysfs.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index f4f6615cad9f..1a1f916be44e 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -6,11 +6,6 @@
6#include <net/bluetooth/bluetooth.h> 6#include <net/bluetooth/bluetooth.h>
7#include <net/bluetooth/hci_core.h> 7#include <net/bluetooth/hci_core.h>
8 8
9#ifndef CONFIG_BT_HCI_CORE_DEBUG
10#undef BT_DBG
11#define BT_DBG(D...)
12#endif
13
14struct class *bt_class = NULL; 9struct class *bt_class = NULL;
15EXPORT_SYMBOL_GPL(bt_class); 10EXPORT_SYMBOL_GPL(bt_class);
16 11
@@ -113,8 +108,7 @@ void hci_conn_add_sysfs(struct hci_conn *conn)
113 conn->dev.class = bt_class; 108 conn->dev.class = bt_class;
114 conn->dev.parent = &hdev->dev; 109 conn->dev.parent = &hdev->dev;
115 110
116 snprintf(conn->dev.bus_id, BUS_ID_SIZE, "%s:%d", 111 dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle);
117 hdev->name, conn->handle);
118 112
119 dev_set_drvdata(&conn->dev, conn); 113 dev_set_drvdata(&conn->dev, conn);
120 114
@@ -132,7 +126,7 @@ void hci_conn_add_sysfs(struct hci_conn *conn)
132 */ 126 */
133static int __match_tty(struct device *dev, void *data) 127static int __match_tty(struct device *dev, void *data)
134{ 128{
135 return !strncmp(dev->bus_id, "rfcomm", 6); 129 return !strncmp(dev_name(dev), "rfcomm", 6);
136} 130}
137 131
138static void del_conn(struct work_struct *work) 132static void del_conn(struct work_struct *work)
@@ -421,7 +415,7 @@ int hci_register_sysfs(struct hci_dev *hdev)
421 dev->class = bt_class; 415 dev->class = bt_class;
422 dev->parent = hdev->parent; 416 dev->parent = hdev->parent;
423 417
424 strlcpy(dev->bus_id, hdev->name, BUS_ID_SIZE); 418 dev_set_name(dev, "%s", hdev->name);
425 419
426 dev_set_drvdata(dev, hdev); 420 dev_set_drvdata(dev, hdev);
427 421