Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce242970 authored by David Herrmann's avatar David Herrmann Committed by Gustavo Padovan
Browse files

Bluetooth: Rename sysfs un/register to add/del



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: default avatarDavid Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent 0ac7e700
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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);