• Ivo van Doorn's avatar
    rt2x00: Fix LED state handling · 9a95dba3
    Ivo van Doorn authored
    For every global LED state change (register/unregister,
    suspend/resume) we should force the LEDS to turn off.
    This makes sure that the LEDS will always be in a sane
    state after the state switch.
    
    Note that when unregister is called but the LED class
    wasn't resumed yet, we shouldn't change the LED state
    since we might not have access to the device (device
    was unplugged while suspended).
    
    Also remove the checks in the activity, assoc and
    radio LEDS which blocked calls to brightness_set()
    when the state hasn't changed. Some of those LEDS
    could be enabled by themselves when something happens
    in the hardware (e.g. firmware is loaded). We already
    did called rt2x00leds to switch the LED off, but those
    calls were blocked.
    Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    9a95dba3
rt2x00leds.c 6.6 KB