leds: flash: Convert non extended registration to inline
authorDan Murphy <dmurphy@ti.com>
Tue, 1 Oct 2019 18:04:36 +0000 (13:04 -0500)
committerPavel <pavel@ucw.cz>
Sun, 3 Nov 2019 16:38:27 +0000 (17:38 +0100)
Convert the #define non-extended registration API to an
inline function.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
include/linux/led-class-flash.h

index 1e824963af17409de8bb066e57e4ca779345c22b..7ff287a9e2a29d767312b7d0abbe75a5fe31523f 100644 (file)
@@ -98,8 +98,11 @@ extern int led_classdev_flash_register_ext(struct device *parent,
                                        struct led_classdev_flash *fled_cdev,
                                        struct led_init_data *init_data);
 
-#define led_classdev_flash_register(parent, fled_cdev)         \
-       led_classdev_flash_register_ext(parent, fled_cdev, NULL)
+static inline int led_classdev_flash_register(struct device *parent,
+                                       struct led_classdev_flash *fled_cdev)
+{
+       return led_classdev_flash_register_ext(parent, fled_cdev, NULL);
+}
 
 /**
  * led_classdev_flash_unregister - unregisters an object of led_classdev class