summaryrefslogtreecommitdiffstats
path: root/drivers/leds/ledtrig-gpio.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-26 10:50:47 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-26 10:50:47 -0700
commitcce1d9f23213f3a8a43b6038df84a665aa8d8612 (patch)
tree0ef75bc1641f7202763591a91fc6030898470f7b /drivers/leds/ledtrig-gpio.c
parentd910fc786014ac3fb72f837c329c112e0c7a9aea (diff)
parentf16a5dba01ed942f427f56b0d1128251721275a5 (diff)
downloadtalos-op-linux-cce1d9f23213f3a8a43b6038df84a665aa8d8612.tar.gz
talos-op-linux-cce1d9f23213f3a8a43b6038df84a665aa8d8612.zip
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds: leds: move leds-clevo-mail's probe function to .devinit.text leds: Fix indentation in LEDS_LP3944 Kconfig entry leds: Fix LED names leds: Fix leds-pca9532 whitespace issues leds: fix coding style in worker thread code for ledtrig-gpio. leds: gpio-leds: fix typographics fault leds: Add WM831x status LED driver
Diffstat (limited to 'drivers/leds/ledtrig-gpio.c')
-rw-r--r--drivers/leds/ledtrig-gpio.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/leds/ledtrig-gpio.c b/drivers/leds/ledtrig-gpio.c
index 1bc5db4ece0d..f5913372d691 100644
--- a/drivers/leds/ledtrig-gpio.c
+++ b/drivers/leds/ledtrig-gpio.c
@@ -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,
OpenPOWER on IntegriCloud