Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1220202

[PATCH v2 2/2] leds: leds-ipaq-micro: Fix coding style issues

From Muhammad Falak R Wani <falakreyaz@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v2 2/2] leds: leds-ipaq-micro: Fix coding style issues
Date 2015-09-07 16:20 +0200
Message-ID <q65r3-7XI-5@gated-at.bofh.it> (permalink)
References <q65ho-7Mu-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Spaces at the starting of a line are removed, indentation
using tab, instead of space. Also, warnings related to 
line width of more than 80 characters is also taken care of.
Two warnings have been left alone to aid better readability.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
 drivers/leds/leds-ipaq-micro.c | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/leds/leds-ipaq-micro.c b/drivers/leds/leds-ipaq-micro.c
index 1206215..86716ea 100644
--- a/drivers/leds/leds-ipaq-micro.c
+++ b/drivers/leds/leds-ipaq-micro.c
@@ -16,9 +16,9 @@
 #define LED_YELLOW	0x00
 #define LED_GREEN	0x01
 
-#define LED_EN          (1 << 4)        /* LED ON/OFF 0:off, 1:on                       */
-#define LED_AUTOSTOP    (1 << 5)        /* LED ON/OFF auto stop set 0:disable, 1:enable */
-#define LED_ALWAYS      (1 << 6)        /* LED Interrupt Mask 0:No mask, 1:mask         */
+#define LED_EN	      (1 << 4) /* LED ON/OFF 0:off, 1:on	      */
+#define LED_AUTOSTOP  (1 << 5) /* LED ON/OFF auto stop set 0:disable,1:enable*/
+#define LED_ALWAYS    (1 << 6) /* LED Interrupt Mask 0:No mask, 1:mask	 */
 
 static void micro_leds_brightness_set(struct led_classdev *led_cdev,
 				      enum led_brightness value)
@@ -27,14 +27,14 @@ static void micro_leds_brightness_set(struct led_classdev *led_cdev,
 	/*
 	 * In this message:
 	 * Byte 0 = LED color: 0 = yellow, 1 = green
-	 *          yellow LED is always ~30 blinks per minute
+	 *	  yellow LED is always ~30 blinks per minute
 	 * Byte 1 = duration (flags?) appears to be ignored
 	 * Byte 2 = green ontime in 1/10 sec (deciseconds)
-	 *          1 = 1/10 second
-	 *          0 = 256/10 second
+	 *	  1 = 1/10 second
+	 *	  0 = 256/10 second
 	 * Byte 3 = green offtime in 1/10 sec (deciseconds)
-	 *          1 = 1/10 second
-	 *          0 = 256/10 seconds
+	 *	  1 = 1/10 second
+	 *	  0 = 256/10 seconds
 	 */
 	struct ipaq_micro_msg msg = {
 		.id = MSG_NOTIFY_LED,
@@ -64,14 +64,14 @@ static int micro_leds_blink_set(struct led_classdev *led_cdev,
 	/*
 	 * In this message:
 	 * Byte 0 = LED color: 0 = yellow, 1 = green
-	 *          yellow LED is always ~30 blinks per minute
+	 *	  yellow LED is always ~30 blinks per minute
 	 * Byte 1 = duration (flags?) appears to be ignored
 	 * Byte 2 = green ontime in 1/10 sec (deciseconds)
-	 *          1 = 1/10 second
-	 *          0 = 256/10 second
+	 *	  1 = 1/10 second
+	 *	  0 = 256/10 second
 	 * Byte 3 = green offtime in 1/10 sec (deciseconds)
-	 *          1 = 1/10 second
-	 *          0 = 256/10 seconds
+	 *	  1 = 1/10 second
+	 *	  0 = 256/10 seconds
 	 */
 	struct ipaq_micro_msg msg = {
 		.id = MSG_NOTIFY_LED,
@@ -79,14 +79,14 @@ static int micro_leds_blink_set(struct led_classdev *led_cdev,
 	};
 
 	msg.tx_data[0] = LED_GREEN;
-        if (*delay_on > IPAQ_LED_MAX_DUTY ||
+	if (*delay_on > IPAQ_LED_MAX_DUTY ||
 	    *delay_off > IPAQ_LED_MAX_DUTY)
-                return -EINVAL;
+		return -EINVAL;
 
-        if (*delay_on == 0 && *delay_off == 0) {
-                *delay_on = 100;
-                *delay_off = 100;
-        }
+	if (*delay_on == 0 && *delay_off == 0) {
+		*delay_on = 100;
+		*delay_off = 100;
+	}
 
 	msg.tx_data[1] = 0;
 	if (*delay_on >= IPAQ_LED_MAX_DUTY)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/2] leds: leds-ipaq-micro: Use resource managed functions and fix coding style. Muhammad Falak R Wani <falakreyaz@gmail.com> - 2015-09-07 16:10 +0200
  [PATCH v2 1/2] leds: leds-ipaq-micro: Use devm_led_classdev_register Muhammad Falak R Wani <falakreyaz@gmail.com> - 2015-09-07 16:20 +0200
    Re: [PATCH v2 1/2] leds: leds-ipaq-micro: Use  devm_led_classdev_register Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-09-07 17:00 +0200
  [PATCH v2 2/2] leds: leds-ipaq-micro: Fix coding style issues Muhammad Falak R Wani <falakreyaz@gmail.com> - 2015-09-07 16:20 +0200
    Re: [PATCH v2 2/2] leds: leds-ipaq-micro: Fix coding style issues Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-09-07 17:00 +0200

csiph-web