Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54416
b: refs/heads/master
c: 53c1d4b
h: refs/heads/master
v: v3
  • Loading branch information
Marcel Holtmann committed May 4, 2007
1 parent 9f42cee commit 26e4976
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: 0878b6667f28772aa7d6b735abff53efc7bf6d91
refs/heads/master: 53c1d4b0b22243c093ded25aaa01c8ff8ab6e6b3
9 changes: 8 additions & 1 deletion trunk/net/bluetooth/hci_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ int hci_register_sysfs(struct hci_dev *hdev)

BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type);

dev->class = bt_class;
dev->bus = &bt_bus;
dev->parent = hdev->parent;

strlcpy(dev->bus_id, hdev->name, BUS_ID_SIZE);
Expand All @@ -322,13 +322,20 @@ 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.kset.kobj,
&dev->kobj, kobject_name(&dev->kobj)) < 0)
BT_ERR("Failed to create class symlink");

return 0;
}

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.kset.kobj,
kobject_name(&hdev->dev.kobj));

device_del(&hdev->dev);
}

Expand Down

0 comments on commit 26e4976

Please sign in to comment.