From 66cd23e33a6d2c3b79c0d5af8896e28a25255ff4 Mon Sep 17 00:00:00 2001 From: Nelson Castillo Date: Wed, 19 Nov 2008 17:11:02 +0000 Subject: Re: [PATCH]: Cleanup of leds-neo1973 Remove unneeded spaces and coding style fixes. Purely cosmetic. --- drivers/leds/leds-neo1973-gta02.c | 10 +++++----- drivers/leds/leds-neo1973-vibrator.c | 23 +++++++++++------------ 2 files changed, 16 insertions(+), 17 deletions(-) (limited to 'drivers') diff --git a/drivers/leds/leds-neo1973-gta02.c b/drivers/leds/leds-neo1973-gta02.c index 0b3f02a9ace..142b5cbd091 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 Openmoko GTA02 GSM phone * - * (C) 2006-2007 by Openmoko, Inc. + * (C) 2006-2008 by Openmoko, Inc. * Author: Harald Welte * 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(>a02led_driver); + platform_driver_unregister(>a02led_driver); } module_init(gta02led_init); module_exit(gta02led_exit); MODULE_AUTHOR("Harald Welte "); -MODULE_DESCRIPTION("FIC Neo1973 GTA02 LED driver"); +MODULE_DESCRIPTION("Openmoko GTA02 LED driver"); MODULE_LICENSE("GPL"); diff --git a/drivers/leds/leds-neo1973-vibrator.c b/drivers/leds/leds-neo1973-vibrator.c index 3cead0f2361..06a4a2ce84d 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 Openmoko GTA01/GTA02 GSM Phones * - * (C) 2006-2007 by Openmoko, Inc. + * (C) 2006-2008 by Openmoko, Inc. * Author: Harald Welte * All rights reserved. * @@ -10,7 +10,7 @@ * published by the Free Software Foundation. * * Javi Roman : - * Implement PWM support for GTA01Bv4 and later + * Implement PWM support for GTA01Bv4 and later */ #include @@ -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 */ @@ -58,13 +59,11 @@ static void neo1973_vib_vib_set(struct led_classdev *led_cdev, * value == 0 -> 0% duty cycle (zero power) */ spin_lock_irqsave(&vp->lock, flags); - if (vp->has_pwm) + 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 +205,5 @@ module_init(neo1973_vib_init); module_exit(neo1973_vib_exit); MODULE_AUTHOR("Harald Welte "); -MODULE_DESCRIPTION("FIC Neo1973 vibrator driver"); +MODULE_DESCRIPTION("Openmoko GTA01/GTA02 vibrator driver"); MODULE_LICENSE("GPL"); -- cgit v1.2.3