From 531060fc1989a438fbc2c3198f5057c40121ff50 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 14 Jan 2012 10:49:44 +0000 Subject: FB: sa1100: combine RGB bitfield overrides into sa1100fb_mach_info Allow the sa1100fb_mach_info structure to carry the RGB bitfield overrides, rather than requiring them to be separately initialized in sa1100fb_get_machine_info(). Acked-by: Florian Tobias Schandinat Signed-off-by: Russell King --- drivers/video/sa1100fb.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'drivers/video/sa1100fb.h') diff --git a/drivers/video/sa1100fb.h b/drivers/video/sa1100fb.h index b1d5b089ee4a..77239b766e56 100644 --- a/drivers/video/sa1100fb.h +++ b/drivers/video/sa1100fb.h @@ -10,10 +10,12 @@ * for more details. */ -/* - * These are the bitfields for each - * display depth that we support. - */ +#define RGB_4 0 +#define RGB_8 1 +#define RGB_16 2 +#define NR_RGB 3 + +/* These are the bitfields for each display depth that we support. */ struct sa1100fb_rgb { struct fb_bitfield red; struct fb_bitfield green; @@ -21,9 +23,7 @@ struct sa1100fb_rgb { struct fb_bitfield transp; }; -/* - * This structure describes the machine which we are running on. - */ +/* This structure describes the machine which we are running on. */ struct sa1100fb_mach_info { u_long pixclock; @@ -47,6 +47,9 @@ struct sa1100fb_mach_info { u_int lccr0; u_int lccr3; + + /* Overrides for the default RGB maps */ + const struct sa1100fb_rgb *rgb[NR_RGB]; }; /* Shadows for LCD controller registers */ @@ -57,11 +60,6 @@ struct sa1100fb_lcd_reg { unsigned long lccr3; }; -#define RGB_4 (0) -#define RGB_8 (1) -#define RGB_16 (2) -#define NR_RGB 3 - struct sa1100fb_info { struct fb_info fb; struct device *dev; -- cgit v1.2.3-59-g8ed1b