[PATCH]: Cleanup of leds-neo1973

Nelson Castillo nelsoneci at gmail.com
Tue Oct 14 19:59:06 CEST 2008


Remove unneeded spaces and coding style fixes. Purely cosmetic.

From: Nelson Castillo <nelsoneci at gmail.com>

 drivers/leds/leds-neo1973-gta02.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
 drivers/leds/leds-neo1973-vibrator.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

Signed-off-by: Nelson Castillo <nelsoneci at gmail.com>

---

diff --git a/drivers/leds/leds-neo1973-gta02.c b/drivers/leds/leds-neo1973-gta02.c
index 706f99f..b86382f 100644
--- a/drivers/leds/leds-neo1973-gta02.c
+++ b/drivers/leds/leds-neo1973-gta02.c
@@ -1,7 +1,7 @@
 /*
- * LED driver for the FIC Neo1973 GTA02 GSM phone
+ * LED driver for the FIC/Openmoko Neo1973 GTA02 GSM phone
  *
- * (C) 2006-2007 by Openmoko, Inc.
+ * (C) 2006-2008 by Openmoko, Inc.
  * Author: Harald Welte <laforge at openmoko.org>
  * All rights reserved.
  *
@@ -48,7 +48,7 @@ static inline struct gta02_led_bundle *to_bundle(struct led_classdev *led_cdev)
 }
 
 static void gta02led_set(struct led_classdev *led_cdev,
-		enum led_brightness value)
+			 enum led_brightness value)
 {
 	unsigned long flags;
 	struct gta02_led_priv *lp = to_priv(led_cdev);
@@ -168,12 +168,12 @@ static int __init gta02led_init(void)
 
 static void __exit gta02led_exit(void)
 {
- 	platform_driver_unregister(&gta02led_driver);
+	platform_driver_unregister(&gta02led_driver);
 }
 
 module_init(gta02led_init);
 module_exit(gta02led_exit);
 
 MODULE_AUTHOR("Harald Welte <laforge at openmoko.org>");
-MODULE_DESCRIPTION("FIC Neo1973 GTA02 LED driver");
+MODULE_DESCRIPTION("FIC/Openmoko Neo1973 GTA02 LED driver");
 MODULE_LICENSE("GPL");
diff --git a/drivers/leds/leds-neo1973-vibrator.c b/drivers/leds/leds-neo1973-vibrator.c
index 494fb83..861380f 100644
--- a/drivers/leds/leds-neo1973-vibrator.c
+++ b/drivers/leds/leds-neo1973-vibrator.c
@@ -1,7 +1,7 @@
 /*
- * LED driver for the vibrator of the FIC Neo1973 GSM Phone
+ * LED driver for the vibrator of the FIC/Openmoko Neo1973 GSM Phone
  *
- * (C) 2006-2007 by Openmoko, Inc.
+ * (C) 2006-2008 by Openmoko, Inc.
  * Author: Harald Welte <laforge at openmoko.org>
  * All rights reserved.
  *
@@ -10,7 +10,7 @@
  * published by the Free Software Foundation.
  *
  * Javi Roman <javiroman at kernel-labs.org>:
- * 	Implement PWM support for GTA01Bv4 and later
+ *	Implement PWM support for GTA01Bv4 and later
  */
 
 #include <linux/kernel.h>
@@ -39,11 +39,12 @@ struct neo1973_vib_priv {
 };
 
 static void neo1973_vib_vib_set(struct led_classdev *led_cdev,
-		enum led_brightness value)
+				enum led_brightness value)
 {
 	unsigned long flags;
-	struct neo1973_vib_priv *vp =
-		container_of(led_cdev, struct neo1973_vib_priv, cdev);
+	struct neo1973_vib_priv *vp = container_of(led_cdev,
+						   struct neo1973_vib_priv,
+						   cdev);
 
 #ifdef CONFIG_MACH_NEO1973_GTA02
 	if (machine_is_neo1973_gta02()) { /* use FIQ to control GPIO */
@@ -59,12 +60,11 @@ static void neo1973_vib_vib_set(struct led_classdev *led_cdev,
 	 */
 	spin_lock_irqsave(&vp->lock, flags);
 	if (vp->has_pwm)
+	{
 		s3c2410_pwm_duty_cycle(value / 4, &vp->pwm);
+	}
 	else {
-		if (value)
-			neo1973_gpb_setpin(vp->gpio, 1);
-		else
-			neo1973_gpb_setpin(vp->gpio, 0);
+		neo1973_gpb_setpin(vp->gpio, value ? 1 : 0);
 	}
 	spin_unlock_irqrestore(&vp->lock, flags);
 }
@@ -206,5 +206,5 @@ module_init(neo1973_vib_init);
 module_exit(neo1973_vib_exit);
 
 MODULE_AUTHOR("Harald Welte <laforge at openmoko.org>");
-MODULE_DESCRIPTION("FIC Neo1973 vibrator driver");
+MODULE_DESCRIPTION("FIC/Openmoko Neo1973 vibrator driver");
 MODULE_LICENSE("GPL");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.openmoko.org/pipermail/openmoko-kernel/attachments/20081014/02ffc1bb/attachment-0005.pgp 


More information about the openmoko-kernel mailing list