Bluetooth: Rename sysfs un/register to add/del
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 8 Oct 2011 12:58:48 +0000 (14:58 +0200)
committerGustavo F. Padovan <padovan@profusion.mobi>
Fri, 14 Oct 2011 18:22:38 +0000 (15:22 -0300)
As we introduced hci_init_sysfs() we should also rename
hci_register_sysfs() and hci_unregister_sysfs() to hci_add_sysfs() and
hci_del_sysfs() like we do with hci_conn_add/del_sysfs(). It looks more
consistent now.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c
net/bluetooth/hci_sysfs.c

index c8cc23c5c936efe0765fd3a335581c445a72ccd0..119b795b28505b5f233a66e1282d43c8530bac8b 100644 (file)
@@ -609,8 +609,8 @@ int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count);
 int hci_recv_stream_fragment(struct hci_dev *hdev, void *data, int count);
 
 void hci_init_sysfs(struct hci_dev *hdev);
-int hci_register_sysfs(struct hci_dev *hdev);
-void hci_unregister_sysfs(struct hci_dev *hdev);
+int hci_add_sysfs(struct hci_dev *hdev);
+void hci_del_sysfs(struct hci_dev *hdev);
 void hci_conn_init_sysfs(struct hci_conn *conn);
 void hci_conn_add_sysfs(struct hci_conn *conn);
 void hci_conn_del_sysfs(struct hci_conn *conn);
index d2445cb06c4245f809b120ee36e3d77ef258967b..49755785a680af0c1f5315dcf33671d6825a7eea 100644 (file)
@@ -1506,7 +1506,7 @@ int hci_register_dev(struct hci_dev *hdev)
        if (!hdev->workqueue)
                goto nomem;
 
-       hci_register_sysfs(hdev);
+       hci_add_sysfs(hdev);
 
        hdev->rfkill = rfkill_alloc(hdev->name, &hdev->dev,
                                RFKILL_TYPE_BLUETOOTH, &hci_rfkill_ops, hdev);
@@ -1561,7 +1561,7 @@ int hci_unregister_dev(struct hci_dev *hdev)
                rfkill_destroy(hdev->rfkill);
        }
 
-       hci_unregister_sysfs(hdev);
+       hci_del_sysfs(hdev);
 
        hci_del_off_timer(hdev);
        del_timer(&hdev->adv_timer);
index a7d5de3a6b5ad0009fd8e907a5f279cd69c86431..1f9f8769e130a4e875d021fba699462e8cab6913 100644 (file)
@@ -553,7 +553,7 @@ void hci_init_sysfs(struct hci_dev *hdev)
        device_initialize(dev);
 }
 
-int hci_register_sysfs(struct hci_dev *hdev)
+int hci_add_sysfs(struct hci_dev *hdev)
 {
        struct device *dev = &hdev->dev;
        int err;
@@ -587,7 +587,7 @@ int hci_register_sysfs(struct hci_dev *hdev)
        return 0;
 }
 
-void hci_unregister_sysfs(struct hci_dev *hdev)
+void hci_del_sysfs(struct hci_dev *hdev)
 {
        BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);