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>
This commit is contained in:
Dan Murphy
2019-10-02 07:40:38 -05:00
committed by Pavel
parent 57e5c31e53
commit 20cdba9d9c
2 changed files with 64 additions and 0 deletions

View File

@@ -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