Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166468
b: refs/heads/master
c: 74cbe20
h: refs/heads/master
v: v3
  • Loading branch information
Thadeu Lima de Souza Cascardo authored and Richard Purdie committed Sep 7, 2009
1 parent afcfb15 commit 45787ba
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2fea09222ab48517d729a7fb4542092cf428f528
refs/heads/master: 74cbe20294c9f54a0926d19235395cf8e22b7830
32 changes: 16 additions & 16 deletions trunk/drivers/leds/ledtrig-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

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 (!gpio_data->gpio)
return;

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);
}
}

static ssize_t gpio_trig_brightness_show(struct device *dev,
Expand Down

0 comments on commit 45787ba

Please sign in to comment.