mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
leds: fix coding style in worker thread code for ledtrig-gpio.
[[email protected]: coding-style fixes] Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: Samuel R. C. Vale <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
This commit is contained in:
parent
2fea09222a
commit
74cbe20294
1 changed files with 16 additions and 16 deletions
|
|
@ -44,22 +44,22 @@ static void gpio_trig_work(struct work_struct *work)
|
|||
struct gpio_trig_data, work);
|
||||
int tmp;
|
||||
|
||||
if (!gpio_data->gpio)
|
||||
return;
|
||||
if (!gpio_data->gpio)
|
||||
return;
|
||||
|
||||
tmp = gpio_get_value(gpio_data->gpio);
|
||||
if (gpio_data->inverted)
|
||||
tmp = !tmp;
|
||||
tmp = gpio_get_value(gpio_data->gpio);
|
||||
if (gpio_data->inverted)
|
||||
tmp = !tmp;
|
||||
|
||||
if (tmp) {
|
||||
if (gpio_data->desired_brightness)
|
||||
led_set_brightness(gpio_data->led,
|
||||
gpio_data->desired_brightness);
|
||||
else
|
||||
led_set_brightness(gpio_data->led, LED_FULL);
|
||||
} else {
|
||||
led_set_brightness(gpio_data->led, LED_OFF);
|
||||
}
|
||||
if (tmp) {
|
||||
if (gpio_data->desired_brightness)
|
||||
led_set_brightness(gpio_data->led,
|
||||
gpio_data->desired_brightness);
|
||||
else
|
||||
led_set_brightness(gpio_data->led, LED_FULL);
|
||||
} else {
|
||||
led_set_brightness(gpio_data->led, LED_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
static ssize_t gpio_trig_brightness_show(struct device *dev,
|
||||
|
|
|
|||
Loading…
Reference in a new issue