Commit d33d1214 authored by Lee Jones's avatar Lee Jones
Browse files

leds: core: Omit set_brightness error message for a LED supporting hw trigger only

If both set_brightness functions return -ENOTSUPP, then the LED doesn't
support setting a fixed brightness value, and the error message isn't
helpful. This can be the case e.g. for LEDs supporting a specific hw
trigger only.

Pinched the subject line and commit message from Heiner:
Link: https://lore.kernel.org/all/44177e37-9512-4044-8991-bb23b184bf37@gmail.com/



Reworked the function to provide Heiner's required semantics whilst
simultaneously increasing readability and flow.

Cc: Pavel Machek <pavel@ucw.cz>
Cc: linux-leds@vger.kernel.org
Suggested-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent 6f963a20
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment