Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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 <pavel@suse.cz>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Pavel Machek and committed by
Linus Torvalds
36a95bf5 bd345962

+10 -13
+10 -13
drivers/video/backlight/locomolcd.c
··· 20 20 21 21 #include <asm/hardware/locomo.h> 22 22 #include <asm/irq.h> 23 + #include <asm/mach/sharpsl_param.h> 24 + #include <asm/mach-types.h> 23 25 24 - #ifdef CONFIG_SA1100_COLLIE 25 - #include <asm/arch/collie.h> 26 - #else 27 - #include <asm/arch/poodle.h> 28 - #endif 29 - 30 - extern void (*sa1100fb_lcd_power)(int on); 26 + #include "../../../arch/arm/mach-sa1100/generic.h" 31 27 32 28 static struct locomo_dev *locomolcd_dev; 33 29 ··· 78 82 79 83 void locomolcd_power(int on) 80 84 { 81 - int comadj = 118; 85 + int comadj = sharpsl_param.comadj; 82 86 unsigned long flags; 83 87 84 88 local_irq_save(flags); ··· 89 93 } 90 94 91 95 /* read comadj */ 92 - #ifdef CONFIG_MACH_POODLE 93 - comadj = 118; 94 - #else 95 - comadj = 128; 96 - #endif 96 + if (comadj == -1) { 97 + if (machine_is_poodle()) 98 + comadj = 118; 99 + if (machine_is_collie()) 100 + comadj = 128; 101 + } 97 102 98 103 if (on) 99 104 locomolcd_on(comadj);