aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDan Murphy <dmurphy@ti.com>2019-10-02 07:40:38 -0500
committerPavel <pavel@ucw.cz>2019-11-03 17:38:36 +0100
commit20cdba9d9c165e475fcc5af97857b6fa7aec96a0 (patch)
tree65c37e1942e0d9b9c3799ba0cd0fdc11b780a6ac /include
parentleds: flash: Remove extern from the header file (diff)
downloadlinux-dev-20cdba9d9c165e475fcc5af97857b6fa7aec96a0.tar.xz
linux-dev-20cdba9d9c165e475fcc5af97857b6fa7aec96a0.zip
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')
-rw-r--r--include/linux/led-class-flash.h14
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