diff options
author | Dan Murphy <dmurphy@ti.com> | 2019-10-02 15:40:38 +0300 |
---|---|---|
committer | Pavel <pavel@ucw.cz> | 2019-11-03 19:38:36 +0300 |
commit | 20cdba9d9c165e475fcc5af97857b6fa7aec96a0 (patch) | |
tree | 65c37e1942e0d9b9c3799ba0cd0fdc11b780a6ac /include/linux/led-class-flash.h | |
parent | 57e5c31e53758aad96699e784a752ad944890b25 (diff) | |
download | linux-20cdba9d9c165e475fcc5af97857b6fa7aec96a0.tar.xz |
leds: flash: Add devm_* functions to the flash class
Add the missing device managed API for registration and
unregistration for the LED flash class.
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'include/linux/led-class-flash.h')
-rw-r--r-- | include/linux/led-class-flash.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/led-class-flash.h b/include/linux/led-class-flash.h index 1bd83159fa4c..21a3358a1731 100644 --- a/include/linux/led-class-flash.h +++ b/include/linux/led-class-flash.h @@ -113,6 +113,20 @@ static inline int led_classdev_flash_register(struct device *parent, */ void led_classdev_flash_unregister(struct led_classdev_flash *fled_cdev); +int devm_led_classdev_flash_register_ext(struct device *parent, + struct led_classdev_flash *fled_cdev, + struct led_init_data *init_data); + + +static inline int devm_led_classdev_flash_register(struct device *parent, + struct led_classdev_flash *fled_cdev) +{ + return devm_led_classdev_flash_register_ext(parent, fled_cdev, NULL); +} + +void devm_led_classdev_flash_unregister(struct device *parent, + struct led_classdev_flash *fled_cdev); + /** * led_set_flash_strobe - setup flash strobe * @fled_cdev: the flash LED to set strobe on |