Re: [patch] fix hardcoded values in collie frontlight

From: Richard Purdie
Date: Sun Mar 05 2006 - 14:51:26 EST


On Sun, 2006-03-05 at 15:28 +0100, Pavel Machek wrote:
> In frontlight support, we should really use values from flash-ROM
> instead of hardcoding our own.
>
> Signed-off-by: Pavel Machek <pavel@xxxxxxx>
>
> diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c
> index ada6e75..2bcff84 100644
> --- a/drivers/video/backlight/locomolcd.c
> +++ b/drivers/video/backlight/locomolcd.c
> @@ -27,7 +28,7 @@
> #include <asm/arch/poodle.h>
> #endif
>
> -extern void (*sa1100fb_lcd_power)(int on);
> +#include "../../../arch/arm/mach-sa1100/generic.h"

This would be neater if that was in some more accessible header in
asm/arch. I'm not sure which header that would be though. Russell?

> @@ -93,11 +94,13 @@ void locomolcd_power(int on)
> }
>
> /* read comadj */
> + if (comadj == -1) {
> #ifdef CONFIG_MACH_POODLE
> - comadj = 118;
> + comadj = 118;
> #else
> - comadj = 128;
> + comadj = 128;
> #endif
> + }

Perhaps use machine_is_poodle() and machine_is_collie() here?

I agree with the changes in principle though.

Richard

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/