aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-08-14 16:07:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-14 16:07:22 -0400
commitc07b3682cd12a017f976ec63bbd4758dc4c5100e (patch)
treed158994137113f31a30feadaae80d3c5d7109a26 /net/bluetooth
parent4d88e3d24905eafa98cef0fc29365649ad8977b5 (diff)
parent2224f2ff9670b899983ff1b42d85530e889cfea1 (diff)
Merge tag 'leds-for-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
Pull LED updates from Jacek Anaszewski: "LED triggers improvements make the biggest part of this pull request. The most striking ones, that allowed for nice cleanups in the triggers are: - centralized handling of creation and removal of trigger sysfs attributes via attribute group - addition of module_led_trigger() helper The other things that need to be mentioned: New features and improvements to existing LED class drivers: - lt3593: add DT support, switch to gpiod interface - lm3692x: support LED sync configuration, change OF calls to fwnode calls - apu: modify PC Engines apu/apu2 driver to support apu3 Change in the drivers/net/can/led.c: - mark led trigger as broken since it's in the way for the further cleanups. It implements a subset of the netdev trigger and an Ack is needed from someone who can actually test and confirm that the netdev trigger works for can devices" * tag 'leds-for-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: (32 commits) leds: ns2: Change unsigned to unsigned int usb: simplify usbport trigger leds: gpio trigger: simplifications from core changes leds: backlight trigger: simplifications from core changes leds: activity trigger: simplifications from core changes leds: default-on trigger: make use of module_led_trigger() leds: heartbeat trigger: simplifications from core changes leds: oneshot trigger: simplifications from core changes leds: transient trigger: simplifications from core changes leds: timer trigger: simplifications from core changes leds: netdev trigger: simplifications from core changes leds: triggers: new function led_set_trigger_data() leds: triggers: define module_led_trigger helper leds: triggers: handle .trigger_data and .activated() in the core leds: triggers: add device attribute support leds: triggers: let struct led_trigger::activate() return an error code leds: triggers: make the MODULE_LICENSE string match the actual license leds: lm3692x: Support LED sync configuration dt: bindings: lm3692x: Update binding for LED sync control leds: lm3692x: Change DT calls to fwnode calls ...
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/leds.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bluetooth/leds.c b/net/bluetooth/leds.c
index cb670b5594eb..6d59a5023231 100644
--- a/net/bluetooth/leds.c
+++ b/net/bluetooth/leds.c
@@ -43,7 +43,7 @@ void hci_leds_update_powered(struct hci_dev *hdev, bool enabled)
43 led_trigger_event(bt_power_led_trigger, enabled ? LED_FULL : LED_OFF); 43 led_trigger_event(bt_power_led_trigger, enabled ? LED_FULL : LED_OFF);
44} 44}
45 45
46static void power_activate(struct led_classdev *led_cdev) 46static int power_activate(struct led_classdev *led_cdev)
47{ 47{
48 struct hci_basic_led_trigger *htrig; 48 struct hci_basic_led_trigger *htrig;
49 bool powered; 49 bool powered;
@@ -52,10 +52,12 @@ static void power_activate(struct led_classdev *led_cdev)
52 powered = test_bit(HCI_UP, &htrig->hdev->flags); 52 powered = test_bit(HCI_UP, &htrig->hdev->flags);
53 53
54 led_trigger_event(led_cdev->trigger, powered ? LED_FULL : LED_OFF); 54 led_trigger_event(led_cdev->trigger, powered ? LED_FULL : LED_OFF);
55
56 return 0;
55} 57}
56 58
57static struct led_trigger *led_allocate_basic(struct hci_dev *hdev, 59static struct led_trigger *led_allocate_basic(struct hci_dev *hdev,
58 void (*activate)(struct led_classdev *led_cdev), 60 int (*activate)(struct led_classdev *led_cdev),
59 const char *name) 61 const char *name)
60{ 62{
61 struct hci_basic_led_trigger *htrig; 63 struct hci_basic_led_trigger *htrig;