summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/hci_core.c2
-rw-r--r--net/bluetooth/leds.c8
-rw-r--r--net/bluetooth/leds.h2
3 files changed, 1 insertions, 11 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 88f1ef3589d8..9c0a6830ff92 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3134,8 +3134,6 @@ void hci_unregister_dev(struct hci_dev *hdev)
id = hdev->id;
- hci_leds_exit(hdev);
-
write_lock(&hci_dev_list_lock);
list_del(&hdev->list);
write_unlock(&hci_dev_list_lock);
diff --git a/net/bluetooth/leds.c b/net/bluetooth/leds.c
index ded7c88eaccc..8319c8440c89 100644
--- a/net/bluetooth/leds.c
+++ b/net/bluetooth/leds.c
@@ -55,7 +55,7 @@ static struct led_trigger *led_allocate_basic(struct hci_dev *hdev,
if (!htrig->led_trigger.name)
goto err_alloc;
- if (led_trigger_register(&htrig->led_trigger))
+ if (devm_led_trigger_register(&hdev->dev, &htrig->led_trigger))
goto err_register;
return &htrig->led_trigger;
@@ -72,9 +72,3 @@ void hci_leds_init(struct hci_dev *hdev)
/* initialize power_led */
hdev->power_led = led_allocate_basic(hdev, power_activate, "power");
}
-
-void hci_leds_exit(struct hci_dev *hdev)
-{
- if (hdev->power_led)
- led_trigger_unregister(hdev->power_led);
-}
diff --git a/net/bluetooth/leds.h b/net/bluetooth/leds.h
index 068261a4e12c..a9c4d6ea01cf 100644
--- a/net/bluetooth/leds.h
+++ b/net/bluetooth/leds.h
@@ -9,10 +9,8 @@
#if IS_ENABLED(CONFIG_BT_LEDS)
void hci_leds_update_powered(struct hci_dev *hdev, bool enabled);
void hci_leds_init(struct hci_dev *hdev);
-void hci_leds_exit(struct hci_dev *hdev);
#else
static inline void hci_leds_update_powered(struct hci_dev *hdev,
bool enabled) {}
static inline void hci_leds_init(struct hci_dev *hdev) {}
-static inline void hci_leds_exit(struct hci_dev *hdev) {}
#endif