mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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:
parent
699a8c7c4b
commit
e389240ad9
2 changed files with 51 additions and 0 deletions
|
@ -199,6 +199,8 @@ void led_classdev_resume(struct led_classdev *led_cdev);
|
|||
|
||||
extern struct led_classdev *of_led_get(struct device_node *np, int index);
|
||||
extern void led_put(struct led_classdev *led_cdev);
|
||||
struct led_classdev *__must_check devm_of_led_get(struct device *dev,
|
||||
int index);
|
||||
|
||||
/**
|
||||
* led_blink_set - set blinking with software fallback
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue