mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
To: me@felipebalbi.com
Cc: trivial@kernel.org, linux-kernel@vger.kernel.org,
	rpurdie@linux.intel.com, rpurdie@rpsys.net,
	srcvale@holoscopio.com,
	Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Subject: [PATCH] Trivial: Fix coding style in worker thread code for ledtrig-gpio.
Date: Tue, 14 Jul 2009 14:58:00 -0300	[thread overview]
Message-ID: <1247594280-3643-1-git-send-email-cascardo@holoscopio.com> (raw)
In-Reply-To: <1247591015-2428-1-git-send-email-cascardo@holoscopio.com>

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Samuel R. C. Vale <srcvale@holoscopio.com>
---
 drivers/leds/ledtrig-gpio.c |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/leds/ledtrig-gpio.c b/drivers/leds/ledtrig-gpio.c
index 1bc5db4..f591337 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,
-- 
1.6.3.3


      parent reply	other threads:[~2009-07-14 17:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14 17:03 [PATCH 1/3] " Thadeu Lima de Souza Cascardo
2009-07-14 17:03 ` [PATCH 2/3] Fix multiple requests and releases of IRQ for GPIO LED Trigger Thadeu Lima de Souza Cascardo
2009-07-14 17:03   ` [PATCH 3/3] After setting inverted attribute, we must update the LED Thadeu Lima de Souza Cascardo
2009-07-14 17:58 ` Thadeu Lima de Souza Cascardo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1247594280-3643-1-git-send-email-cascardo@holoscopio.com \
    --to=cascardo@holoscopio.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@felipebalbi.com \
    --cc=rpurdie@linux.intel.com \
    --cc=rpurdie@rpsys.net \
    --cc=srcvale@holoscopio.com \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®