leds: Add managed API to get a LED from a device driver

If the LED is acquired by a consumer device with devm_led_get(), it is
automatically released when the device is detached.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
This commit is contained in:
Jean-Jacques Hiblot 2019-10-03 10:28:10 +02:00 • committed by Pavel
commit e389240ad9
2 changed files with 51 additions and 0 deletions