]> err.no Git - linux-2.6/blobdiff - net/bluetooth/hci_sysfs.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
[linux-2.6] / net / bluetooth / hci_sysfs.c
index a18871e01582152724a8a80f29fa400c9df6ef5d..c85bf8f678dc5f1456788d3ebce5212627211912 100644 (file)
@@ -311,7 +311,6 @@ static void add_conn(struct work_struct *work)
 void hci_conn_add_sysfs(struct hci_conn *conn)
 {
        struct hci_dev *hdev = conn->hdev;
-       bdaddr_t *ba = &conn->dst;
 
        BT_DBG("conn %p", conn);
 
@@ -320,11 +319,8 @@ void hci_conn_add_sysfs(struct hci_conn *conn)
 
        conn->dev.release = bt_release;
 
-       snprintf(conn->dev.bus_id, BUS_ID_SIZE,
-                       "%s%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X",
-                       conn->type == ACL_LINK ? "acl" : "sco",
-                       ba->b[5], ba->b[4], ba->b[3],
-                       ba->b[2], ba->b[1], ba->b[0]);
+       snprintf(conn->dev.bus_id, BUS_ID_SIZE, "%s:%d",
+                                       hdev->name, conn->handle);
 
        dev_set_drvdata(&conn->dev, conn);
 
@@ -402,10 +398,6 @@ int hci_register_sysfs(struct hci_dev *hdev)
                if (device_create_file(dev, bt_attrs[i]) < 0)
                        BT_ERR("Failed to create device attribute");
 
-       if (sysfs_create_link(&bt_class->subsys.kobj,
-                               &dev->kobj, kobject_name(&dev->kobj)) < 0)
-               BT_ERR("Failed to create class symlink");
-
        return 0;
 }
 
@@ -413,9 +405,6 @@ void hci_unregister_sysfs(struct hci_dev *hdev)
 {
        BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type);
 
-       sysfs_remove_link(&bt_class->subsys.kobj,
-                                       kobject_name(&hdev->dev.kobj));
-
        device_del(&hdev->dev);
 }