The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@rpsys.net>
To: Pavel Machek <pavel@ucw.cz>, Russell King <rmk@arm.linux.org.uk>
Cc: Andrew Morton <akpm@osdl.org>,
	lenz@cs.wisc.edu, kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [patch] fix hardcoded values in collie frontlight
Date: Mon, 06 Mar 2006 17:10:03 +0000	[thread overview]
Message-ID: <1141665004.6524.64.camel@localhost.localdomain> (raw)
In-Reply-To: <20060306115728.GB28908@elf.ucw.cz>

On Mon, 2006-03-06 at 12:57 +0100, Pavel Machek wrote:
> In frontlight support, we should really use values from flash-ROM
> instead of hardcoding our own. Cleanup includes.
> 
> Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
> 
> --- a/drivers/video/backlight/locomolcd.c
> +++ b/drivers/video/backlight/locomolcd.c
> @@ -20,14 +20,10 @@
>  
>  #include <asm/hardware/locomo.h>
>  #include <asm/irq.h>
> +#include <asm/mach/sharpsl_param.h>
> +#include <asm/mach-types.h>
>  
> -#ifdef CONFIG_SA1100_COLLIE
> -#include <asm/arch/collie.h>
> -#else
> -#include <asm/arch/poodle.h>
> -#endif
> -
> -extern void (*sa1100fb_lcd_power)(int on);
> +#include "../../../arch/arm/mach-sa1100/generic.h"
>  
>  static struct locomo_dev *locomolcd_dev;
>  
> @@ -82,7 +78,7 @@ static void locomolcd_off(int comadj)
>  
>  void locomolcd_power(int on)
>  {
> -	int comadj = 118;
> +	int comadj = sharpsl_param.comadj;
>  	unsigned long flags;
>  
>  	local_irq_save(flags);
> @@ -93,11 +89,12 @@ void locomolcd_power(int on)
>  	}
>  
>  	/* read comadj */
> -#ifdef CONFIG_MACH_POODLE
> -	comadj = 118;
> -#else
> -	comadj = 128;
> -#endif
> +	if (comadj == -1) {
> +		if (machine_is_poodle())
> +			comadj = 118;
> +		if (machine_is_collie())
> +			comadj = 128;
> +	}
>  
>  	if (on)
>  		locomolcd_on(comadj);
> 
> 


      reply	other threads:[~2006-03-06 17:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-05 14:28 [patch] fix hardcoded values in collie frontlight Pavel Machek
2006-03-05 19:46 ` Richard Purdie
2006-03-06 11:56   ` Pavel Machek
2006-03-06 11:57   ` Pavel Machek
2006-03-06 17:10     ` Richard Purdie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1141665004.6524.64.camel@localhost.localdomain \
    --to=rpurdie@rpsys.net \
    --cc=akpm@osdl.org \
    --cc=lenz@cs.wisc.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rmk@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox