Commit ec28a8cf authored by Dan Murphy's avatar Dan Murphy Committed by Pavel

leds: core: Remove extern from header

extern is implied and is not needed in the header file.
Remove the extern keyword and re-align the code.
Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
parent e63a7448
...@@ -161,7 +161,7 @@ struct led_classdev { ...@@ -161,7 +161,7 @@ struct led_classdev {
* *
* Returns: 0 on success or negative error value on failure * Returns: 0 on success or negative error value on failure
*/ */
extern int led_classdev_register_ext(struct device *parent, int led_classdev_register_ext(struct device *parent,
struct led_classdev *led_cdev, struct led_classdev *led_cdev,
struct led_init_data *init_data); struct led_init_data *init_data);
...@@ -181,7 +181,7 @@ static inline int led_classdev_register(struct device *parent, ...@@ -181,7 +181,7 @@ static inline int led_classdev_register(struct device *parent,
return led_classdev_register_ext(parent, led_cdev, NULL); return led_classdev_register_ext(parent, led_cdev, NULL);
} }
extern int devm_led_classdev_register_ext(struct device *parent, int devm_led_classdev_register_ext(struct device *parent,
struct led_classdev *led_cdev, struct led_classdev *led_cdev,
struct led_init_data *init_data); struct led_init_data *init_data);
...@@ -190,11 +190,11 @@ static inline int devm_led_classdev_register(struct device *parent, ...@@ -190,11 +190,11 @@ static inline int devm_led_classdev_register(struct device *parent,
{ {
return devm_led_classdev_register_ext(parent, led_cdev, NULL); return devm_led_classdev_register_ext(parent, led_cdev, NULL);
} }
extern void led_classdev_unregister(struct led_classdev *led_cdev); void led_classdev_unregister(struct led_classdev *led_cdev);
extern void devm_led_classdev_unregister(struct device *parent, void devm_led_classdev_unregister(struct device *parent,
struct led_classdev *led_cdev); struct led_classdev *led_cdev);
extern void led_classdev_suspend(struct led_classdev *led_cdev); void led_classdev_suspend(struct led_classdev *led_cdev);
extern void led_classdev_resume(struct led_classdev *led_cdev); void led_classdev_resume(struct led_classdev *led_cdev);
/** /**
* led_blink_set - set blinking with software fallback * led_blink_set - set blinking with software fallback
...@@ -211,9 +211,8 @@ extern void led_classdev_resume(struct led_classdev *led_cdev); ...@@ -211,9 +211,8 @@ extern void led_classdev_resume(struct led_classdev *led_cdev);
* led_cdev->brightness_set() will not stop the blinking, * led_cdev->brightness_set() will not stop the blinking,
* use led_classdev_brightness_set() instead. * use led_classdev_brightness_set() instead.
*/ */
extern void led_blink_set(struct led_classdev *led_cdev, void led_blink_set(struct led_classdev *led_cdev, unsigned long *delay_on,
unsigned long *delay_on, unsigned long *delay_off);
unsigned long *delay_off);
/** /**
* led_blink_set_oneshot - do a oneshot software blink * led_blink_set_oneshot - do a oneshot software blink
* @led_cdev: the LED to start blinking * @led_cdev: the LED to start blinking
...@@ -228,10 +227,9 @@ extern void led_blink_set(struct led_classdev *led_cdev, ...@@ -228,10 +227,9 @@ extern void led_blink_set(struct led_classdev *led_cdev,
* If invert is set, led blinks for delay_off first, then for * If invert is set, led blinks for delay_off first, then for
* delay_on and leave the led on after the on-off cycle. * delay_on and leave the led on after the on-off cycle.
*/ */
extern void led_blink_set_oneshot(struct led_classdev *led_cdev, void led_blink_set_oneshot(struct led_classdev *led_cdev,
unsigned long *delay_on, unsigned long *delay_on, unsigned long *delay_off,
unsigned long *delay_off, int invert);
int invert);
/** /**
* led_set_brightness - set LED brightness * led_set_brightness - set LED brightness
* @led_cdev: the LED to set * @led_cdev: the LED to set
...@@ -241,8 +239,8 @@ extern void led_blink_set_oneshot(struct led_classdev *led_cdev, ...@@ -241,8 +239,8 @@ extern void led_blink_set_oneshot(struct led_classdev *led_cdev,
* software blink timer that implements blinking when the * software blink timer that implements blinking when the
* hardware doesn't. This function is guaranteed not to sleep. * hardware doesn't. This function is guaranteed not to sleep.
*/ */
extern void led_set_brightness(struct led_classdev *led_cdev, void led_set_brightness(struct led_classdev *led_cdev,
enum led_brightness brightness); enum led_brightness brightness);
/** /**
* led_set_brightness_sync - set LED brightness synchronously * led_set_brightness_sync - set LED brightness synchronously
...@@ -255,8 +253,8 @@ extern void led_set_brightness(struct led_classdev *led_cdev, ...@@ -255,8 +253,8 @@ extern void led_set_brightness(struct led_classdev *led_cdev,
* *
* Returns: 0 on success or negative error value on failure * Returns: 0 on success or negative error value on failure
*/ */
extern int led_set_brightness_sync(struct led_classdev *led_cdev, int led_set_brightness_sync(struct led_classdev *led_cdev,
enum led_brightness value); enum led_brightness value);
/** /**
* led_update_brightness - update LED brightness * led_update_brightness - update LED brightness
...@@ -267,7 +265,7 @@ extern int led_set_brightness_sync(struct led_classdev *led_cdev, ...@@ -267,7 +265,7 @@ extern int led_set_brightness_sync(struct led_classdev *led_cdev,
* *
* Returns: 0 on success or negative error value on failure * Returns: 0 on success or negative error value on failure
*/ */
extern int led_update_brightness(struct led_classdev *led_cdev); int led_update_brightness(struct led_classdev *led_cdev);
/** /**
* led_get_default_pattern - return default pattern * led_get_default_pattern - return default pattern
...@@ -279,8 +277,7 @@ extern int led_update_brightness(struct led_classdev *led_cdev); ...@@ -279,8 +277,7 @@ extern int led_update_brightness(struct led_classdev *led_cdev);
* Return: Allocated array of integers with default pattern from device tree * Return: Allocated array of integers with default pattern from device tree
* or NULL. Caller is responsible for kfree(). * or NULL. Caller is responsible for kfree().
*/ */
extern u32 *led_get_default_pattern(struct led_classdev *led_cdev, u32 *led_get_default_pattern(struct led_classdev *led_cdev, unsigned int *size);
unsigned int *size);
/** /**
* led_sysfs_disable - disable LED sysfs interface * led_sysfs_disable - disable LED sysfs interface
...@@ -288,7 +285,7 @@ extern u32 *led_get_default_pattern(struct led_classdev *led_cdev, ...@@ -288,7 +285,7 @@ extern u32 *led_get_default_pattern(struct led_classdev *led_cdev,
* *
* Disable the led_cdev's sysfs interface. * Disable the led_cdev's sysfs interface.
*/ */
extern void led_sysfs_disable(struct led_classdev *led_cdev); void led_sysfs_disable(struct led_classdev *led_cdev);
/** /**
* led_sysfs_enable - enable LED sysfs interface * led_sysfs_enable - enable LED sysfs interface
...@@ -296,7 +293,7 @@ extern void led_sysfs_disable(struct led_classdev *led_cdev); ...@@ -296,7 +293,7 @@ extern void led_sysfs_disable(struct led_classdev *led_cdev);
* *
* Enable the led_cdev's sysfs interface. * Enable the led_cdev's sysfs interface.
*/ */
extern void led_sysfs_enable(struct led_classdev *led_cdev); void led_sysfs_enable(struct led_classdev *led_cdev);
/** /**
* led_compose_name - compose LED class device name * led_compose_name - compose LED class device name
...@@ -311,8 +308,8 @@ extern void led_sysfs_enable(struct led_classdev *led_cdev); ...@@ -311,8 +308,8 @@ extern void led_sysfs_enable(struct led_classdev *led_cdev);
* *
* Returns: 0 on success or negative error value on failure * Returns: 0 on success or negative error value on failure
*/ */
extern int led_compose_name(struct device *dev, struct led_init_data *init_data, int led_compose_name(struct device *dev, struct led_init_data *init_data,
char *led_classdev_name); char *led_classdev_name);
/** /**
* led_sysfs_is_disabled - check if LED sysfs interface is disabled * led_sysfs_is_disabled - check if LED sysfs interface is disabled
...@@ -362,27 +359,24 @@ struct led_trigger { ...@@ -362,27 +359,24 @@ struct led_trigger {
#define led_trigger_get_drvdata(dev) (led_get_trigger_data(led_trigger_get_led(dev))) #define led_trigger_get_drvdata(dev) (led_get_trigger_data(led_trigger_get_led(dev)))
/* Registration functions for complex triggers */ /* Registration functions for complex triggers */
extern int led_trigger_register(struct led_trigger *trigger); int led_trigger_register(struct led_trigger *trigger);
extern void led_trigger_unregister(struct led_trigger *trigger); void led_trigger_unregister(struct led_trigger *trigger);
extern int devm_led_trigger_register(struct device *dev, int devm_led_trigger_register(struct device *dev,
struct led_trigger *trigger); struct led_trigger *trigger);
extern void led_trigger_register_simple(const char *name, void led_trigger_register_simple(const char *name,
struct led_trigger **trigger); struct led_trigger **trigger);
extern void led_trigger_unregister_simple(struct led_trigger *trigger); void led_trigger_unregister_simple(struct led_trigger *trigger);
extern void led_trigger_event(struct led_trigger *trigger, void led_trigger_event(struct led_trigger *trigger, enum led_brightness event);
enum led_brightness event); void led_trigger_blink(struct led_trigger *trigger, unsigned long *delay_on,
extern void led_trigger_blink(struct led_trigger *trigger, unsigned long *delay_off);
unsigned long *delay_on, void led_trigger_blink_oneshot(struct led_trigger *trigger,
unsigned long *delay_off); unsigned long *delay_on,
extern void led_trigger_blink_oneshot(struct led_trigger *trigger, unsigned long *delay_off,
unsigned long *delay_on, int invert);
unsigned long *delay_off, void led_trigger_set_default(struct led_classdev *led_cdev);
int invert); int led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trigger);
extern void led_trigger_set_default(struct led_classdev *led_cdev); void led_trigger_remove(struct led_classdev *led_cdev);
extern int led_trigger_set(struct led_classdev *led_cdev,
struct led_trigger *trigger);
extern void led_trigger_remove(struct led_classdev *led_cdev);
static inline void led_set_trigger_data(struct led_classdev *led_cdev, static inline void led_set_trigger_data(struct led_classdev *led_cdev,
void *trigger_data) void *trigger_data)
...@@ -410,8 +404,7 @@ static inline void *led_get_trigger_data(struct led_classdev *led_cdev) ...@@ -410,8 +404,7 @@ static inline void *led_get_trigger_data(struct led_classdev *led_cdev)
* This is meant to be used on triggers with statically * This is meant to be used on triggers with statically
* allocated name. * allocated name.
*/ */
extern void led_trigger_rename_static(const char *name, void led_trigger_rename_static(const char *name, struct led_trigger *trig);
struct led_trigger *trig);
#define module_led_trigger(__led_trigger) \ #define module_led_trigger(__led_trigger) \
module_driver(__led_trigger, led_trigger_register, \ module_driver(__led_trigger, led_trigger_register, \
...@@ -453,20 +446,20 @@ static inline void *led_get_trigger_data(struct led_classdev *led_cdev) ...@@ -453,20 +446,20 @@ static inline void *led_get_trigger_data(struct led_classdev *led_cdev)
/* Trigger specific functions */ /* Trigger specific functions */
#ifdef CONFIG_LEDS_TRIGGER_DISK #ifdef CONFIG_LEDS_TRIGGER_DISK
extern void ledtrig_disk_activity(bool write); void ledtrig_disk_activity(bool write);
#else #else
static inline void ledtrig_disk_activity(bool write) {} static inline void ledtrig_disk_activity(bool write) {}
#endif #endif
#ifdef CONFIG_LEDS_TRIGGER_MTD #ifdef CONFIG_LEDS_TRIGGER_MTD
extern void ledtrig_mtd_activity(void); void ledtrig_mtd_activity(void);
#else #else
static inline void ledtrig_mtd_activity(void) {} static inline void ledtrig_mtd_activity(void) {}
#endif #endif
#if defined(CONFIG_LEDS_TRIGGER_CAMERA) || defined(CONFIG_LEDS_TRIGGER_CAMERA_MODULE) #if defined(CONFIG_LEDS_TRIGGER_CAMERA) || defined(CONFIG_LEDS_TRIGGER_CAMERA_MODULE)
extern void ledtrig_flash_ctrl(bool on); void ledtrig_flash_ctrl(bool on);
extern void ledtrig_torch_ctrl(bool on); void ledtrig_torch_ctrl(bool on);
#else #else
static inline void ledtrig_flash_ctrl(bool on) {} static inline void ledtrig_flash_ctrl(bool on) {}
static inline void ledtrig_torch_ctrl(bool on) {} static inline void ledtrig_torch_ctrl(bool on) {}
...@@ -546,7 +539,7 @@ enum cpu_led_event { ...@@ -546,7 +539,7 @@ enum cpu_led_event {
CPU_LED_HALTED, /* Machine shutdown */ CPU_LED_HALTED, /* Machine shutdown */
}; };
#ifdef CONFIG_LEDS_TRIGGER_CPU #ifdef CONFIG_LEDS_TRIGGER_CPU
extern void ledtrig_cpu(enum cpu_led_event evt); void ledtrig_cpu(enum cpu_led_event evt);
#else #else
static inline void ledtrig_cpu(enum cpu_led_event evt) static inline void ledtrig_cpu(enum cpu_led_event evt)
{ {
...@@ -555,7 +548,7 @@ static inline void ledtrig_cpu(enum cpu_led_event evt) ...@@ -555,7 +548,7 @@ static inline void ledtrig_cpu(enum cpu_led_event evt)
#endif #endif
#ifdef CONFIG_LEDS_BRIGHTNESS_HW_CHANGED #ifdef CONFIG_LEDS_BRIGHTNESS_HW_CHANGED
extern void led_classdev_notify_brightness_hw_changed( void led_classdev_notify_brightness_hw_changed(
struct led_classdev *led_cdev, enum led_brightness brightness); struct led_classdev *led_cdev, enum led_brightness brightness);
#else #else
static inline void led_classdev_notify_brightness_hw_changed( static inline void led_classdev_notify_brightness_hw_changed(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment