leds: Rename led_brightness_set() to led_set_brightness()
Rename leds external interface led_brightness_set() to led_set_brightness(). This is the second phase of the change to reduce confusion between the leds internal and external interfaces that set brightness. With this change, now the external interface is led_set_brightness(). The first phase renamed the internal interface led_set_brightness() to __led_set_brightness(). There are no changes to the interface implementations. Signed-off-by: Shuah Khan <shuahkhan@gmail.com> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
This commit is contained in:
parent
0da3e65ba8
commit
19cd67e2d5
7 changed files with 9 additions and 9 deletions
|
@ -222,7 +222,7 @@ void led_classdev_unregister(struct led_classdev *led_cdev)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Stop blinking */
|
/* Stop blinking */
|
||||||
led_brightness_set(led_cdev, LED_OFF);
|
led_set_brightness(led_cdev, LED_OFF);
|
||||||
|
|
||||||
device_unregister(led_cdev->dev);
|
device_unregister(led_cdev->dev);
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ void led_blink_set_oneshot(struct led_classdev *led_cdev,
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(led_blink_set_oneshot);
|
EXPORT_SYMBOL(led_blink_set_oneshot);
|
||||||
|
|
||||||
void led_brightness_set(struct led_classdev *led_cdev,
|
void led_set_brightness(struct led_classdev *led_cdev,
|
||||||
enum led_brightness brightness)
|
enum led_brightness brightness)
|
||||||
{
|
{
|
||||||
/* stop and clear soft-blink timer */
|
/* stop and clear soft-blink timer */
|
||||||
|
@ -113,4 +113,4 @@ void led_brightness_set(struct led_classdev *led_cdev,
|
||||||
|
|
||||||
__led_set_brightness(led_cdev, brightness);
|
__led_set_brightness(led_cdev, brightness);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(led_brightness_set);
|
EXPORT_SYMBOL(led_set_brightness);
|
||||||
|
|
|
@ -112,7 +112,7 @@ void led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trig)
|
||||||
if (led_cdev->trigger->deactivate)
|
if (led_cdev->trigger->deactivate)
|
||||||
led_cdev->trigger->deactivate(led_cdev);
|
led_cdev->trigger->deactivate(led_cdev);
|
||||||
led_cdev->trigger = NULL;
|
led_cdev->trigger = NULL;
|
||||||
led_brightness_set(led_cdev, LED_OFF);
|
led_set_brightness(led_cdev, LED_OFF);
|
||||||
}
|
}
|
||||||
if (trig) {
|
if (trig) {
|
||||||
write_lock_irqsave(&trig->leddev_list_lock, flags);
|
write_lock_irqsave(&trig->leddev_list_lock, flags);
|
||||||
|
|
|
@ -177,7 +177,7 @@ static void oneshot_trig_deactivate(struct led_classdev *led_cdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stop blinking */
|
/* Stop blinking */
|
||||||
led_brightness_set(led_cdev, LED_OFF);
|
led_set_brightness(led_cdev, LED_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct led_trigger oneshot_led_trigger = {
|
static struct led_trigger oneshot_led_trigger = {
|
||||||
|
|
|
@ -104,7 +104,7 @@ static void timer_trig_deactivate(struct led_classdev *led_cdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stop blinking */
|
/* Stop blinking */
|
||||||
led_brightness_set(led_cdev, LED_OFF);
|
led_set_brightness(led_cdev, LED_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct led_trigger timer_led_trigger = {
|
static struct led_trigger timer_led_trigger = {
|
||||||
|
|
|
@ -124,7 +124,7 @@ extern void led_blink_set_oneshot(struct led_classdev *led_cdev,
|
||||||
unsigned long *delay_off,
|
unsigned long *delay_off,
|
||||||
int invert);
|
int invert);
|
||||||
/**
|
/**
|
||||||
* led_brightness_set - set LED brightness
|
* led_set_brightness - set LED brightness
|
||||||
* @led_cdev: the LED to set
|
* @led_cdev: the LED to set
|
||||||
* @brightness: the brightness to set it to
|
* @brightness: the brightness to set it to
|
||||||
*
|
*
|
||||||
|
@ -132,7 +132,7 @@ 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.
|
* hardware doesn't.
|
||||||
*/
|
*/
|
||||||
extern void led_brightness_set(struct led_classdev *led_cdev,
|
extern void led_set_brightness(struct led_classdev *led_cdev,
|
||||||
enum led_brightness brightness);
|
enum led_brightness brightness);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -276,7 +276,7 @@ static void ieee80211_stop_tpt_led_trig(struct ieee80211_local *local)
|
||||||
|
|
||||||
read_lock(&tpt_trig->trig.leddev_list_lock);
|
read_lock(&tpt_trig->trig.leddev_list_lock);
|
||||||
list_for_each_entry(led_cdev, &tpt_trig->trig.led_cdevs, trig_list)
|
list_for_each_entry(led_cdev, &tpt_trig->trig.led_cdevs, trig_list)
|
||||||
led_brightness_set(led_cdev, LED_OFF);
|
led_set_brightness(led_cdev, LED_OFF);
|
||||||
read_unlock(&tpt_trig->trig.leddev_list_lock);
|
read_unlock(&tpt_trig->trig.leddev_list_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue