Skip to content

Commit

Permalink
leds: flash: Convert non extended registration to inline
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Murphy authored and Pavel committed Nov 3, 2019
1 parent f884e86 commit 4a29f90
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/linux/led-class-flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4a29f90

Please sign in to comment.