lkml.org 
[lkml]   [2008]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH/HP7XX] - Add combined LCD / BL driver for platform HP Jornada 7xx handhelds
Kristoffer Ericson wrote:
> Oki, here is attempt #2 (btw, new mail or just keep thread?)
>
> Tested to build and checkpatch.
>
> diff --git a/drivers/video/backlight/jornada720_bllcd.c b/drivers/video/backlight/jornada720_bllcd.c

> +static int jornada_bl_update_status(struct backlight_device *dev)
> +{
> + int ret = 0;
> +
> + jornada_ssp_start();
> +
> + if (dev->props.power != FB_BLANK_UNBLANK ||
> + dev->props.fb_blank != FB_BLANK_UNBLANK) {
> + ret = jornada_ssp_inout(BRIGHTNESSOFF);
> + if (ret == -ETIMEDOUT)

since there is no curly bracket here...

> + printk(KERN_ERR "jornada720_bl: \
> + BrightnessOff timeout\n");

...indentation is wrong in lines below

> + /* backlight off */
> + PPSR &= ~PPC_LDD1;
> + PPDR |= PPC_LDD1;
> +
> + } else { /* backlight on */

too much indentation in lines below as well

> + PPSR |= PPC_LDD1;
> + if ((jornada_ssp_inout(SETBRIGHTNESS)) == TXDUMMY) {
> + /* send brightness value (0 is max, 255 lowest) */
> + if (jornada_ssp_byte(JORNADA_BL_MAX_BRIGHTNESS -
> + dev->props.brightness) != -ETIMEDOUT)
> + ret = (JORNADA_BL_MAX_BRIGHTNESS -
> + dev->props.brightness);
> + } else
> + printk(KERN_ERR "jornada720_bl: \
> + SetBrightness timeout\n");
> + }
> + jornada_ssp_end();
> +
> + return ret;
> +}

> +static int jornada_lcd_set_contrast(struct lcd_device *pdev, int contrast)
> +{
> + int ret = 0;
> +
> + jornada_ssp_start();
> +
> + ret = jornada_ssp_inout(SETCONTRAST);
> +
> + if (ret == -ETIMEDOUT)
> + printk(KERN_ERR "jornada_lcd: failure to set contrast\n");
> + else

whitespace before else

> + ret = jornada_ssp_byte(contrast);
> +
> + jornada_ssp_end();
> +
> + return ret;
> +}
> +
> +static int jornada_lcd_set_power(struct lcd_device *pdev, int power)
> +{
> + if (power != FB_BLANK_UNBLANK) {
> + /* turn off LCD */
> + PPSR &= ~PPC_LDD2;
> + PPDR |= PPC_LDD2;
> + } else {
> + /* turn on LCD */
> + PPSR |= PPC_LDD2;
> + }

whitespace before curly bracket

> +
> + return 0;
> +}


\
 
 \ /
  Last update: 2008-02-06 18:07    [W:0.070 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site