• Hans de Goede's avatar
    Bluetooth: Use led_set_brightness() in LED trigger activate() callback · 97c7ed86
    Hans de Goede authored
    A LED trigger's activate() callback gets called when the LED trigger
    gets activated for a specific LED, so that the trigger code can ensure
    the LED state matches the current state of the trigger condition
    (LED_FULL when HCI_UP is set in this case).
    
    led_trigger_event() is intended for trigger condition state changes and
    iterates over _all_ LEDs which are controlled by this trigger changing
    the brightness of each of them.
    
    In the activate() case only the brightness of the LED which is being
    activated needs to change and that LED is passed as an argument to
    activate(), switch to led_set_brightness() to only change the brightness
    of the LED being activated.
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
    97c7ed86
leds.c 2.21 KB