mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
leds: fix coding style in worker thread code for ledtrig-gpio.
[akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Samuel R. C. Vale <srcvale@holoscopio.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
2fea09222a
commit
74cbe20294
1 changed files with 14 additions and 14 deletions
|
@ -44,22 +44,22 @@ static void gpio_trig_work(struct work_struct *work)
|
||||||
struct gpio_trig_data, work);
|
struct gpio_trig_data, work);
|
||||||
int tmp;
|
int tmp;
|
||||||
|
|
||||||
if (!gpio_data->gpio)
|
if (!gpio_data->gpio)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tmp = gpio_get_value(gpio_data->gpio);
|
tmp = gpio_get_value(gpio_data->gpio);
|
||||||
if (gpio_data->inverted)
|
if (gpio_data->inverted)
|
||||||
tmp = !tmp;
|
tmp = !tmp;
|
||||||
|
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
if (gpio_data->desired_brightness)
|
if (gpio_data->desired_brightness)
|
||||||
led_set_brightness(gpio_data->led,
|
led_set_brightness(gpio_data->led,
|
||||||
gpio_data->desired_brightness);
|
gpio_data->desired_brightness);
|
||||||
else
|
else
|
||||||
led_set_brightness(gpio_data->led, LED_FULL);
|
led_set_brightness(gpio_data->led, LED_FULL);
|
||||||
} else {
|
} else {
|
||||||
led_set_brightness(gpio_data->led, LED_OFF);
|
led_set_brightness(gpio_data->led, LED_OFF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t gpio_trig_brightness_show(struct device *dev,
|
static ssize_t gpio_trig_brightness_show(struct device *dev,
|
||||||
|
|
Loading…
Reference in a new issue