backlight: 88pm860x_bl: fix checkpatch warning
Subsystems (4)
PATCH 1/17 backlight: 88pm860x_bl: fix checkpatch warning
This patch fixes the checkpatch warning as below:
WARNING: quoted string split across lines
--- drivers/video/backlight/88pm860x_bl.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/backlight/88pm860x_bl.c +2 -2
@@ -117,8 +117,8 @@ static int pm860x_backlight_set(struct backlight_device *bl, int brightness) data->current_brightness = value;return 0 ; out: -dev_dbg (chip->dev,"set brightness %d failure with return " -"value:%d\n" , value, ret); +dev_dbg (chip->dev,"set brightness %d failure with return value: %d\n" , + value, ret);return ret; }
Signature · 1 line
1.7.1
PATCH 2/17 backlight: atmel-pwm-bl: fix checkpatch warning
This patch fixes the checkpatch warning as below:
WARNING: quoted string split across lines
--- drivers/video/backlight/atmel-pwm-bl.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/video/backlight/atmel-pwm-bl.c +3 -4
@@ -106,10 +106,9 @@ static int atmel_pwm_bl_init_pwm(struct atmel_pwm_bl *pwmbl)pwm_channel_writel (&pwmbl->pwmc,PWM_CPRD , pwmbl->pdata->pwm_compare_max); -dev_info (&pwmbl->pdev->dev,"Atmel PWM backlight driver " -"(%lu Hz)\n" , pwmbl->pwmc.mck / - pwmbl->pdata->pwm_compare_max / - (1 << prescale)); +dev_info (&pwmbl->pdev->dev,"Atmel PWM backlight driver (%lu Hz)\n" , + pwmbl->pwmc.mck / pwmbl->pdata->pwm_compare_max / + (1 << prescale));return pwm_channel_enable (&pwmbl->pwmc); }
Signature · 1 line
1.7.1
PATCH 3/17 backlight: corgi_lcd: fix checkpatch error and warning
In reply to Jingoo HanThis patch fixes the checkpatch error and warning as below:
WARNING: please, no space before tabs
WARNING: quoted string split across lines
ERROR: space required before the open parenthesis '('
--- drivers/video/backlight/corgi_lcd.c | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
drivers/video/backlight/corgi_lcd.c +9 -7
@@ -6,8 +6,8 @@* Based on Sharp's 2.4 Backlight Driver * * Copyright (c) 2008 Marvell International Ltd. -* Converted to SPI device based LCD/Backlight device driver -* by Eric Miao <[email protected]> +* Converted to SPI device based LCD/Backlight device driver +* by Eric Miao <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -192,7 +192,7 @@ static void lcdtg_set_phadadj(struct corgi_lcd *lcd, int mode) {int adj; -switch (mode) { +switch (mode) {case CORGI_LCD_MODE_VGA :/* Setting for VGA */ adj = sharpsl_param.phadadj;
@@ -495,8 +495,9 @@ static int setup_gpio_backlight(struct corgi_lcd *lcd, err =devm_gpio_request (&spi->dev, pdata->gpio_backlight_on,"BL_ON" );if (err) { -dev_err (&spi->dev,"failed to request GPIO%d for " -"backlight_on\n" , pdata->gpio_backlight_on); +dev_err (&spi->dev, +"failed to request GPIO%d for backlight_on\n" , + pdata->gpio_backlight_on);return err; }
@@ -508,8 +509,9 @@ static int setup_gpio_backlight(struct corgi_lcd *lcd, err =devm_gpio_request (&spi->dev, pdata->gpio_backlight_cont,"BL_CONT" );if (err) { -dev_err (&spi->dev,"failed to request GPIO%d for " -"backlight_cont\n" , pdata->gpio_backlight_cont); +dev_err (&spi->dev, +"failed to request GPIO%d for backlight_cont\n" , + pdata->gpio_backlight_cont);return err; }
Signature · 1 line
1.7.1
PATCH 4/17 backlight: da903x_bl: fix checkpatch warning
In reply to Jingoo HanThis patch fixes the checkpatch warning as below:
WARNING: please, no space before tabs
WARNING: quoted string split across lines
--- drivers/video/backlight/da903x_bl.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/video/backlight/da903x_bl.c +4 -4
@@ -2,10 +2,10 @@* Backlight driver for Dialog Semiconductor DA9030/DA9034 * * Copyright (C) 2008 Compulab, Ltd. -* Mike Rapoport <[email protected]> +* Mike Rapoport <[email protected]> * * Copyright (C) 2006-2008 Marvell International Ltd. -* Eric Miao <[email protected]> +* Eric Miao <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -199,7 +199,7 @@ static struct platform_driver da903x_backlight_driver = {module_platform_driver (da903x_backlight_driver);MODULE_DESCRIPTION ("Backlight Driver for Dialog Semiconductor DA9030/DA9034" ); -MODULE_AUTHOR ("Eric Miao <[email protected]>" -"Mike Rapoport <[email protected]>" ); +MODULE_AUTHOR ("Eric Miao <[email protected]>" ); +MODULE_AUTHOR ("Mike Rapoport <[email protected]>" );MODULE_LICENSE ("GPL" );MODULE_ALIAS ("platform:da903x-backlight" );
Signature · 1 line
1.7.1
PATCH 5/17 backlight: generic_bl: fix checkpatch warning
In reply to Jingoo HanThis patch fixes the checkpatch warning as below:
WARNING: space prohibited between function name and open parenthesis '('
--- drivers/video/backlight/generic_bl.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/backlight/generic_bl.c +2 -2
@@ -97,8 +97,8 @@ static int genericbl_probe(struct platform_device *pdev) props.max_brightness = machinfo->max_intensity; bd =backlight_device_register (name, &pdev->dev,NULL , &genericbl_ops, &props); -if (IS_ERR (bd)) -return PTR_ERR (bd); +if (IS_ERR (bd)) +return PTR_ERR (bd);platform_set_drvdata (pdev, bd);
Signature · 1 line
1.7.1
PATCH 6/17 backlight: hp680_bl: fix checkpatch error and warning
In reply to Jingoo HanThis patch fixes the checkpatch error and warning as below:
WARNING: please, no space before tabs
WARNING: please, no spaces at the start of a line
ERROR: do not initialise statics to 0 or NULL
ERROR: code indent should use tabs where possible
--- drivers/video/backlight/hp680_bl.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/backlight/hp680_bl.c +2 -2
@@ -26,7 +26,7 @@#define HP680_DEFAULT_INTENSITY 10static int hp680bl_suspended; -static int current_intensity =0 ; +static int current_intensity;static DEFINE_SPINLOCK (bl_lock);static void hp680bl_send_intensity (struct backlight_device *bd)
@@ -168,7 +168,7 @@ static int __init hp680bl_init(void) static void __exit hp680bl_exit(void) {platform_device_unregister (hp680bl_device); -platform_driver_unregister (&hp680bl_driver); +platform_driver_unregister (&hp680bl_driver); }module_init (hp680bl_init);
Signature · 1 line
1.7.1
PATCH 7/17 backlight: ili9320: fix checkpatch error and warning
In reply to Jingoo HanThis patch fixes the checkpatch error and warning as below:
WARNING: please, no space before tabs
WARNING: please, no spaces at the start of a line
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
WARNING: braces {} are not necessary for single statement blocks
ERROR: code indent should use tabs where possible
--- drivers/video/backlight/ili9320.c | 12 ++---------- 1 files changed, 2 insertions(+), 10 deletions(-)
drivers/video/backlight/ili9320.c +2 -10
@@ -45,7 +45,7 @@ static inline int ili9320_write_spi(struct ili9320 *ili,/* second message is the data to transfer */ data[0 ] = spi->id |ILI9320_SPI_DATA |ILI9320_SPI_WRITE ; - data[1 ] = value >>8 ; + data[1 ] = value >>8 ; data[2 ] = value;return spi_sync (spi->dev, &spi->message);
@@ -56,7 +56,6 @@ int ili9320_write(struct ili9320 *ili, unsigned int reg, unsigned int value)dev_dbg (ili->dev,"write: reg=%02x, val=%04x\n" , reg, value);return ili->write (ili, reg, value); } -EXPORT_SYMBOL_GPL (ili9320_write); int ili9320_write_regs(struct ili9320 *ili,
@@ -74,7 +73,6 @@ int ili9320_write_regs(struct ili9320 *ili,return 0 ; } -EXPORT_SYMBOL_GPL (ili9320_write_regs);static void ili9320_reset (struct ili9320 *lcd)
@@ -260,7 +258,6 @@ int __devinit ili9320_probe_spi(struct spi_device *spi,return ret; } -EXPORT_SYMBOL_GPL (ili9320_probe_spi);int ili9320_remove (struct ili9320 *ili)
@@ -271,7 +268,6 @@ int ili9320_remove(struct ili9320 *ili)return 0 ; } -EXPORT_SYMBOL_GPL (ili9320_remove);#ifdef CONFIG_PM
@@ -296,20 +292,17 @@ int ili9320_suspend(struct ili9320 *lcd, pm_message_t state) return 0; } -EXPORT_SYMBOL_GPL (ili9320_suspend);int ili9320_resume (struct ili9320 *lcd) {dev_info (lcd->dev,"resuming from power state %d\n" , lcd->power); -if (lcd->platdata->suspend ==ILI9320_SUSPEND_DEEP ) { +if (lcd->platdata->suspend ==ILI9320_SUSPEND_DEEP )ili9320_write (lcd,ILI9320_POWER1 ,0x00 ); - }return ili9320_power (lcd,FB_BLANK_UNBLANK ); } -EXPORT_SYMBOL_GPL (ili9320_resume);#endif
@@ -318,7 +311,6 @@ void ili9320_shutdown(struct ili9320 *lcd) {ili9320_power (lcd,FB_BLANK_POWERDOWN ); } -EXPORT_SYMBOL_GPL (ili9320_shutdown);MODULE_AUTHOR ("Ben Dooks <[email protected]>" );
Signature · 1 line
1.7.1
PATCH 8/17 backlight: jornada720: fix checkpatch error and warning
In reply to Jingoo HanThis patch fixes the checkpatch error and warning as below:
WARNING: line over 80 characters
ERROR: return is not a function, parentheses are not required
Also, long comments are fixed for the preferred style.
--- drivers/video/backlight/jornada720_bl.c | 34 ++++++++++++++++++----------- drivers/video/backlight/jornada720_lcd.c | 3 +- 2 files changed, 23 insertions(+), 14 deletions(-)
drivers/video/backlight/jornada720_bl.c +21 -13
@@ -48,7 +48,7 @@ static int jornada_bl_get_brightness(struct backlight_device *bd)jornada_ssp_end (); -return (BL_MAX_BRIGHT - ret); +return BL_MAX_BRIGHT - ret; }static int jornada_bl_update_status (struct backlight_device *bd)
@@ -58,7 +58,8 @@ static int jornada_bl_update_status(struct backlight_device *bd)jornada_ssp_start ();/* If backlight is off then really turn it off */ -if ((bd->props.power !=FB_BLANK_UNBLANK ) || (bd->props.fb_blank !=FB_BLANK_UNBLANK )) { +if ((bd->props.power !=FB_BLANK_UNBLANK ) || + (bd->props.fb_blank !=FB_BLANK_UNBLANK )) { ret =jornada_ssp_byte (BRIGHTNESSOFF );if (ret !=TXDUMMY ) {pr_info ("brightness off timeout\n" );
@@ -77,18 +78,23 @@ static int jornada_bl_update_status(struct backlight_device *bd) goto out; } -/* at this point we expect that the mcu has accepted -our command and is waiting for our new value -please note that maximum brightness is 255, -but due to physical layout it is equal to 0, so we simply -invert the value (MAX VALUE - NEW VALUE). */ -if (jornada_ssp_byte (BL_MAX_BRIGHT - bd->props.brightness) !=TXDUMMY ) { +/* +* at this point we expect that the mcu has accepted +* our command and is waiting for our new value +* please note that maximum brightness is 255, +* but due to physical layout it is equal to 0, so we simply +* invert the value (MAX VALUE - NEW VALUE). +*/ +if (jornada_ssp_byte (BL_MAX_BRIGHT - bd->props.brightness) + !=TXDUMMY ) {pr_err ("set brightness failed\n" ); ret = -ETIMEDOUT ; } -/* If infact we get an TXDUMMY as output we are happy and dont -make any further comments about it */ +/* +* If infact we get an TXDUMMY as output we are happy and dont +* make any further comments about it +*/ out:jornada_ssp_end ();
@@ -121,9 +127,11 @@ static int jornada_bl_probe(struct platform_device *pdev) bd->props.power =FB_BLANK_UNBLANK ; bd->props.brightness =BL_DEF_BRIGHT ; -/* note. make sure max brightness is set otherwise -you will get seemingly non-related errors when -trying to change brightness */ +/* +* note. make sure max brightness is set otherwise +* you will get seemingly non-related errors when +* trying to change brightness +*/ jornada_bl_update_status (bd);platform_set_drvdata (pdev, bd);
drivers/video/backlight/jornada720_lcd.c +2 -1
@@ -101,7 +101,8 @@ static int jornada_lcd_probe(struct platform_device *pdev)struct lcd_device *lcd_device;int ret; - lcd_device =lcd_device_register (S1D_DEVICENAME , &pdev->dev,NULL , &jornada_lcd_props); + lcd_device =lcd_device_register (S1D_DEVICENAME , &pdev->dev,NULL , + &jornada_lcd_props);if (IS_ERR (lcd_device)) { ret =PTR_ERR (lcd_device);
Signature · 1 line
1.7.1
Re: [PATCH 08/17] backlight: jornada720: fix checkpatch error and warning
Thanks,
Best wishes
Kristoffer Ericson
Jingoo Han skrev 2012-10-16 09:30:
Quoted 98 lines
This patch fixes the checkpatch error and warning as below:
WARNING: line over 80 characters
ERROR: return is not a function, parentheses are not requiredAlso, long comments are fixed for the preferred style.
Signed-off-by Jingoo Han <[email protected]>Cc Richard Purdie <[email protected]>--- drivers/video/backlight/jornada720_bl.c | 34 ++++++++++++++++++----------- drivers/video/backlight/jornada720_lcd.c | 3 +- 2 files changed, 23 insertions(+), 14 deletions(-)drivers/video/backlight/jornada720_bl.c +21
-13@@ -48,7 +48,7 @@ static int jornada_bl_get_brightness(struct backlight_device *bd)jornada_ssp_end (); -return (BL_MAX_BRIGHT - ret); +return BL_MAX_BRIGHT - ret; }static int jornada_bl_update_status (struct backlight_device *bd)@@ -58,7 +58,8 @@ static int jornada_bl_update_status(struct backlight_device *bd)jornada_ssp_start ();/* If backlight is off then really turn it off */ -if ((bd->props.power !=FB_BLANK_UNBLANK ) || (bd->props.fb_blank !=FB_BLANK_UNBLANK )) { +if ((bd->props.power !=FB_BLANK_UNBLANK ) || + (bd->props.fb_blank !=FB_BLANK_UNBLANK )) { ret =jornada_ssp_byte (BRIGHTNESSOFF );if (ret !=TXDUMMY ) {pr_info ("brightness off timeout\n" );@@ -77,18 +78,23 @@ static int jornada_bl_update_status(struct backlight_device *bd) goto out; } -/* at this point we expect that the mcu has accepted -our command and is waiting for our new value -please note that maximum brightness is 255, -but due to physical layout it is equal to 0, so we simply -invert the value (MAX VALUE - NEW VALUE). */ -if (jornada_ssp_byte (BL_MAX_BRIGHT - bd->props.brightness) !=TXDUMMY ) { +/* +* at this point we expect that the mcu has accepted +* our command and is waiting for our new value +* please note that maximum brightness is 255, +* but due to physical layout it is equal to 0, so we simply +* invert the value (MAX VALUE - NEW VALUE). +*/ +if (jornada_ssp_byte (BL_MAX_BRIGHT - bd->props.brightness) + !=TXDUMMY ) {pr_err ("set brightness failed\n" ); ret = -ETIMEDOUT ; } -/* If infact we get an TXDUMMY as output we are happy and dont -make any further comments about it */ +/* +* If infact we get an TXDUMMY as output we are happy and dont +* make any further comments about it +*/ out:jornada_ssp_end ();@@ -121,9 +127,11 @@ static int jornada_bl_probe(struct platform_device *pdev) bd->props.power =FB_BLANK_UNBLANK ; bd->props.brightness =BL_DEF_BRIGHT ; -/* note. make sure max brightness is set otherwise -you will get seemingly non-related errors when -trying to change brightness */ +/* +* note. make sure max brightness is set otherwise +* you will get seemingly non-related errors when +* trying to change brightness +*/ jornada_bl_update_status (bd);platform_set_drvdata (pdev, bd);drivers/video/backlight/jornada720_lcd.c +2
-1@@ -101,7 +101,8 @@ static int jornada_lcd_probe(struct platform_device *pdev)struct lcd_device *lcd_device;int ret; - lcd_device =lcd_device_register (S1D_DEVICENAME , &pdev->dev,NULL , &jornada_lcd_props); + lcd_device =lcd_device_register (S1D_DEVICENAME , &pdev->dev,NULL , + &jornada_lcd_props);if (IS_ERR (lcd_device)) { ret =PTR_ERR (lcd_device);
PATCH 9/17 backlight: l4f00242t03: fix checkpatch warning
In reply to Jingoo HanThis patch fixes the checkpatch warning as below:
WARNING: please, no space before tabs
Also, unnecessary line is removed.
--- drivers/video/backlight/l4f00242t03.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/video/backlight/l4f00242t03.c +1 -2
@@ -4,7 +4,7 @@* Copyright 2007-2009 Freescale Semiconductor, Inc. All Rights Reserved. * * Copyright (c) 2009 Alberto Panizzo <[email protected]> -* Inspired by Marek Vasut work in l4f00242t03.c +* Inspired by Marek Vasut work in l4f00242t03.c * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -33,7 +33,6 @@ struct l4f00242t03_priv {struct regulator *core_reg; }; -static void l4f00242t03_reset (unsigned int gpio) {pr_debug ("l4f00242t03_reset.\n" );
Signature · 1 line
1.7.1
PATCH 10/17 backlight: lm3630: fix checkpatch warning
In reply to Jingoo HanThis patch fixes the checkpatch warning as below:
WARNING: static const char * array should probably be static const char * const
--- drivers/video/backlight/lm3630_bl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/backlight/lm3630_bl.c +1 -1
@@ -37,7 +37,7 @@ enum lm3630_leds {BLED_2 }; -static const char *bled_name[] = { +static const char *const bled_name[] = { [BLED_ALL ] ="lm3630_bled" ,/*Bank1 controls all string */ [BLED_1 ] ="lm3630_bled1" ,/*Bank1 controls bled1 */ [BLED_2 ] ="lm3630_bled2" ,/*Bank1 or 2 controls bled2 */
Signature · 1 line
1.7.1
PATCH 11/17 backlight: locomolcd: fix checkpatch error and warning
In reply to Jingoo HanThis patch fixes the checkpatch error and warning as below:
WARNING: line over 80 characters
WARNING: space prohibited between function name and open parenthesis '('
ERROR: trailing statements should be on next line
Also, long comments are fixed for the preferred style and unnecessary lines are removed.
--- drivers/video/backlight/locomolcd.c | 65 +++++++++++++++++++++++------------ 1 files changed, 43 insertions(+), 22 deletions(-)
drivers/video/backlight/locomolcd.c +43 -22
@@ -33,19 +33,25 @@ static unsigned long locomolcd_flags;static void locomolcd_on (int comadj) { -locomo_gpio_set_dir (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHA_ON ,0 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHA_ON ,1 ); +locomo_gpio_set_dir (locomolcd_dev->dev.parent, +LOCOMO_GPIO_LCD_VSHA_ON ,0 ); +locomo_gpio_write (locomolcd_dev->dev.parent, +LOCOMO_GPIO_LCD_VSHA_ON ,1 );mdelay (2 ); -locomo_gpio_set_dir (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHD_ON ,0 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHD_ON ,1 ); +locomo_gpio_set_dir (locomolcd_dev->dev.parent, +LOCOMO_GPIO_LCD_VSHD_ON ,0 ); +locomo_gpio_write (locomolcd_dev->dev.parent, +LOCOMO_GPIO_LCD_VSHD_ON ,1 );mdelay (2 );locomo_m62332_senddata (locomolcd_dev, comadj,0 );mdelay (5 ); -locomo_gpio_set_dir (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VEE_ON ,0 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VEE_ON ,1 ); +locomo_gpio_set_dir (locomolcd_dev->dev.parent, +LOCOMO_GPIO_LCD_VEE_ON ,0 ); +locomo_gpio_write (locomolcd_dev->dev.parent, +LOCOMO_GPIO_LCD_VEE_ON ,1 );mdelay (10 );/* TFTCRST | CPSOUT=0 | CPSEN */
@@ -68,16 +74,19 @@ static void locomolcd_off(int comadj)locomo_writel (0x06 , locomolcd_dev->mapbase +LOCOMO_TC );mdelay (1 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHA_ON ,0 ); +locomo_gpio_write (locomolcd_dev->dev.parent, +LOCOMO_GPIO_LCD_VSHA_ON ,0 );mdelay (110 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VEE_ON ,0 ); +locomo_gpio_write (locomolcd_dev->dev.parent, +LOCOMO_GPIO_LCD_VEE_ON ,0 );mdelay (700 );/* TFTCRST=0 | CPSOUT=0 | CPSEN = 0 */ locomo_writel (0 , locomolcd_dev->mapbase +LOCOMO_TC );locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_MOD ,0 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHD_ON ,0 ); +locomo_gpio_write (locomolcd_dev->dev.parent, +LOCOMO_GPIO_LCD_VSHD_ON ,0 ); }void locomolcd_power (int on)
@@ -107,7 +116,6 @@ void locomolcd_power(int on) }EXPORT_SYMBOL (locomolcd_power); -static int current_intensity;static int locomolcd_set_intensity (struct backlight_device *bd)
@@ -122,13 +130,25 @@ static int locomolcd_set_intensity(struct backlight_device *bd) intensity =0 ;switch (intensity) { -/* AC and non-AC are handled differently, but produce same results in sharp code? */ -case 0 :locomo_frontlight_set (locomolcd_dev,0 ,0 ,161 );break ; -case 1 :locomo_frontlight_set (locomolcd_dev,117 ,0 ,161 );break ; -case 2 :locomo_frontlight_set (locomolcd_dev,163 ,0 ,148 );break ; -case 3 :locomo_frontlight_set (locomolcd_dev,194 ,0 ,161 );break ; -case 4 :locomo_frontlight_set (locomolcd_dev,194 ,1 ,161 );break ; - +/* +* AC and non-AC are handled differently, +* but produce same results in sharp code? +*/ +case 0 : +locomo_frontlight_set (locomolcd_dev,0 ,0 ,161 ); +break ; +case 1 : +locomo_frontlight_set (locomolcd_dev,117 ,0 ,161 ); +break ; +case 2 : +locomo_frontlight_set (locomolcd_dev,163 ,0 ,148 ); +break ; +case 3 : +locomo_frontlight_set (locomolcd_dev,194 ,0 ,161 ); +break ; +case 4 : +locomo_frontlight_set (locomolcd_dev,194 ,1 ,161 ); +break ;default :return -ENODEV ; }
@@ -175,9 +195,11 @@ static int locomolcd_probe(struct locomo_dev *ldev)locomo_gpio_set_dir (ldev->dev.parent,LOCOMO_GPIO_FL_VR ,0 ); -/* the poodle_lcd_power function is called for the first time +/* +* the poodle_lcd_power function is called for the first time * from fs_initcall, which is before locomo is activated. -* We need to recall poodle_lcd_power here*/ +* We need to recall poodle_lcd_power here +*/ if (machine_is_poodle ())locomolcd_power (1 );
@@ -190,8 +212,8 @@ static int locomolcd_probe(struct locomo_dev *ldev) &ldev->dev,NULL , &locomobl_data, &props); -if (IS_ERR (locomolcd_bl_device)) -return PTR_ERR (locomolcd_bl_device); +if (IS_ERR (locomolcd_bl_device)) +return PTR_ERR (locomolcd_bl_device);/* Set up frontlight so that screen is readable */ locomolcd_bl_device->props.brightness =2 ;
@@ -226,7 +248,6 @@ static struct locomo_driver poodle_lcd_driver = { .resume = locomolcd_resume, }; -static int __init locomolcd_init (void ) {return locomo_driver_register (&poodle_lcd_driver);
Signature · 1 line
1.7.1
PATCH 12/17 backlight: omap1: fix checkpatch warning
In reply to Jingoo HanThis patch fixes the checkpatch warning as below:
ERROR: inline keyword should sit between storage class and type
--- drivers/video/backlight/omap1_bl.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/backlight/omap1_bl.c +2 -2
@@ -42,12 +42,12 @@ struct omap_backlight {struct omap_backlight_config *pdata; }; -static void inline omapbl_send_intensity (int intensity) +static inline void omapbl_send_intensity (int intensity) {omap_writeb (intensity,OMAP_PWL_ENABLE ); } -static void inline omapbl_send_enable (int enable) +static inline void omapbl_send_enable (int enable) {omap_writeb (enable,OMAP_PWL_CLK_ENABLE ); }
Signature · 1 line
1.7.1
PATCH 13/17 backlight: pcf50633: fix checkpatch warning
In reply to Jingoo HanThis patch fixes the checkpatch warning as below:
WARNING: please, no spaces at the start of a line
Also, long comments are fixed for the preferred style.
--- drivers/video/backlight/pcf50633-backlight.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
drivers/video/backlight/pcf50633-backlight.c +5 -3
@@ -52,7 +52,7 @@ int pcf50633_bl_set_brightness_limit(struct pcf50633 *pcf, unsigned int limit) pcf_bl->brightness_limit = limit &0x3f ;backlight_update_status (pcf_bl->bl); -return 0 ; +return 0 ; }static int pcf50633_bl_update_status (struct backlight_device *bl)
@@ -136,8 +136,10 @@ static int __devinit pcf50633_bl_probe(struct platform_device *pdev)pcf50633_reg_write (pcf_bl->pcf,PCF50633_REG_LEDDIM , pdata->ramp_time); -/* Should be different from bl_props.brightness, so we do not exit -* update_status early the first time it's called */ +/* +* Should be different from bl_props.brightness, so we do not exit +* update_status early the first time it's called +*/ pcf_bl->brightness = pcf_bl->bl->props.brightness +1 ;backlight_update_status (pcf_bl->bl);
Signature · 1 line
1.7.1
PATCH 14/17 backlight: platform_lcd: fix checkpatch error
In reply to Jingoo HanThis patch fixes the checkpatch error as below:
ERROR: spaces prohibited around that ':' (ctx:WxW)
--- drivers/video/backlight/platform_lcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/backlight/platform_lcd.c +1 -1
@@ -27,7 +27,7 @@ struct platform_lcd {struct plat_lcd_data *pdata;unsigned int power; - unsigned int suspended : 1; + unsigned int suspended:1; };static inline struct platform_lcd *to_our_lcd (struct lcd_device *lcd)
Signature · 1 line
1.7.1
PATCH 15/17 backlight: tdo24m: fix checkpatch warning
In reply to Jingoo HanThis patch fixes the checkpatch warning as below:
WARNING: please, no space before tabs
--- drivers/video/backlight/tdo24m.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/video/backlight/tdo24m.c +3 -3
@@ -2,7 +2,7 @@* tdo24m - SPI-based drivers for Toppoly TDO24M series LCD panels * * Copyright (C) 2008 Marvell International Ltd. -* Eric Miao <[email protected]> +* Eric Miao <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -90,7 +90,7 @@ static uint32_t lcd_qvga_pass_through_tdo24m[] = { };static uint32_t lcd_vga_transfer_tdo24m[] = { -CMD1 (0xcf ,0x02 ),/* Blanking period control (1) */ +CMD1 (0xcf ,0x02 ),/* Blanking period control (1) */ CMD2 (0xd0 ,0x08 ,0x04 ),/* Blanking period control (2) */ CMD1 (0xd1 ,0x01 ),/* CKV timing control on/off */ CMD2 (0xd2 ,0x14 ,0x00 ),/* CKV 1,2 timing control */
@@ -132,7 +132,7 @@ static uint32_t lcd_qvga_pass_through_tdo35s[] = { };static uint32_t lcd_vga_transfer_tdo35s[] = { -CMD1 (0xcf ,0x02 ),/* Blanking period control (1) */ +CMD1 (0xcf ,0x02 ),/* Blanking period control (1) */ CMD2 (0xd0 ,0x08 ,0x04 ),/* Blanking period control (2) */ CMD1 (0xd1 ,0x01 ),/* CKV timing control on/off */ CMD2 (0xd2 ,0x00 ,0x1e ),/* CKV 1,2 timing control */
Signature · 1 line
1.7.1
PATCH 16/17 backlight: tosa: fix checkpatch error and warning
In reply to Jingoo HanThis patch fixes the checkpatch error and warning as below:
WARNING: line over 80 characters
ERROR: spaces required around that '?' (ctx:VxW)
ERROR: space required after that ',' (ctx:VxV)
Also, unnecessary lines are removed.
--- drivers/video/backlight/tosa_bl.c | 4 ++-- drivers/video/backlight/tosa_lcd.c | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-)
drivers/video/backlight/tosa_bl.c +2 -2
@@ -90,7 +90,8 @@ static int __devinit tosa_bl_probe(struct i2c_client *client,if (!data)return -ENOMEM ; - data->comadj = sharpsl_param.comadj ==-1 ?COMADJ_DEFAULT : sharpsl_param.comadj; + data->comadj = sharpsl_param.comadj ==-1 ? +COMADJ_DEFAULT : sharpsl_param.comadj; ret =devm_gpio_request (&client->dev,TOSA_GPIO_BL_C20MA ,"backlight" );if (ret) {
@@ -163,7 +164,6 @@ static const struct i2c_device_id tosa_bl_id[] = { { }, }; -static struct i2c_driver tosa_bl_driver = { .driver = { .name ="tosa-bl" ,
drivers/video/backlight/tosa_lcd.c +9 -7
@@ -63,7 +63,7 @@ static int tosa_tg_send(struct spi_device *spi, int adrs, uint8_t data)int tosa_bl_enable (struct spi_device *spi,int enable) {/* bl_enable GP04=1 otherwise GP04=0*/ -return tosa_tg_send (spi,TG_GPODR2 , enable?0x01 :0x00 ); +return tosa_tg_send (spi,TG_GPODR2 , enable ?0x01 :0x00 ); }EXPORT_SYMBOL (tosa_bl_enable);
@@ -91,15 +91,17 @@ static void tosa_lcd_tg_on(struct tosa_lcd_data *data)tosa_tg_send (spi,TG_PNLCTL , value);/* TG LCD pannel power up */ -tosa_tg_send (spi,TG_PINICTL ,0x4 ); +tosa_tg_send (spi,TG_PINICTL ,0x4 );mdelay (50 );/* TG LCD GVSS */ -tosa_tg_send (spi,TG_PINICTL ,0x0 ); +tosa_tg_send (spi,TG_PINICTL ,0x0 );if (!data->i2c) { -/* after the pannel is powered up the first time, we can access the i2c bus */ -/* so probe for the DAC */ +/* +* after the pannel is powered up the first time, +* we can access the i2c bus so probe for the DAC +*/ struct i2c_adapter *adap =i2c_get_adapter (0 );struct i2c_board_info info = { .type ="tosa-bl" ,
@@ -115,11 +117,11 @@ static void tosa_lcd_tg_off(struct tosa_lcd_data *data)struct spi_device *spi = data->spi;/* TG LCD VHSA off */ -tosa_tg_send (spi,TG_PINICTL ,0x4 ); +tosa_tg_send (spi,TG_PINICTL ,0x4 );mdelay (50 );/* TG LCD signal off */ -tosa_tg_send (spi,TG_PINICTL ,0x6 ); +tosa_tg_send (spi,TG_PINICTL ,0x6 );mdelay (50 );/* TG Off */
Signature · 1 line
1.7.1
PATCH 17/17 backlight: vgg2432a4: fix checkpatch warning
In reply to Jingoo HanThis patch fixes the checkpatch warning as below:
WARNING: please, no space before tabs
--- drivers/video/backlight/vgg2432a4.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/backlight/vgg2432a4.c +1 -1
@@ -217,7 +217,7 @@ static int vgg2432a4_resume(struct spi_device *spi) }#else #define vgg2432a4_suspend NULL -#define vgg2432a4_resume NULL +#define vgg2432a4_resume NULL#endif static struct ili9320_client vgg2432a4_client = {
Signature · 1 line
1.7.1