From: Pavel Machek Date: Sat, 25 Mar 2006 11:07:33 +0000 (-0800) Subject: [PATCH] fix hardcoded values in collie frontlight X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=36a95bf5cd2c33280282da18eff0180a99cff201;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [PATCH] fix hardcoded values in collie frontlight In frontlight support, we should really use values from flash-ROM instead of hardcoding our own. Cleanup includes. Signed-off-by: Pavel Machek Acked-by: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c index ada6e75eb048..60831bb23685 100644 --- a/drivers/video/backlight/locomolcd.c +++ b/drivers/video/backlight/locomolcd.c @@ -20,14 +20,10 @@ #include #include +#include +#include -#ifdef CONFIG_SA1100_COLLIE -#include -#else -#include -#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);