diff options
author | Hans de Goede <hdegoede@redhat.com> | 2021-04-04 09:52:50 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2021-04-07 12:46:32 +0200 |
commit | efb618fba54d7df0414f395b6213a469c075f859 (patch) | |
tree | 0ed5f39b452f4a28daf712a1bc8e7e21dbf3aabf /drivers/ipack | |
parent | 69aea9d2843669387d100e353b5113d1adc9502f (diff) |
HID: elan: Silence mute LED errors being logged when the device is unplugged
Being integrated into an USB keyboard-dock the mute LED can go away
at any time, leading to the following errors:
[ 918.667671] elan 0003:04F3:0755.0002: Failed to set mute led brightness: -19
[ 918.667737] leds elan:red:mute: Setting an LED's brightness failed (-19)
Fix this by making the following changes:
1. Don't log an error from elan_mute_led_set_brigtness() when
ret == -ENODEV
2. Set the LED_HW_PLUGGABLE flag on the mute LED led_classdev
While at it also make sure that elan_mute_led_set_brigtness() returns
an error (-EIO) when ret != 3 but it is not an error (>= 0).
Reviewed-by: Marek BehĂșn <kabel@kernel.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/ipack')
0 files changed, 0 insertions, 0 deletions