Skip to content

Commit

Permalink
bluetooth: remove improper bluetooth class symlinks.
Browse files Browse the repository at this point in the history
Don't create symlinks in a class to a device that is not owned by the
class.  If the bluetooth subsystem really wants to point to all of the
devices it controls, it needs to create real devices, not fake symlinks.

Cc: Maxim Krasnyansky <maxk@qualcomm.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Jul 22, 2008
1 parent 110cf37 commit 16be63f
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions net/bluetooth/hci_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,20 +398,13 @@ 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;
}

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);
}

Expand Down

0 comments on commit 16be63f

Please sign in to comment.