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

FB: sa1100: move platform data to platform files

Move platform data out of the sa1100fb driver into the various
platform files themselves.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

+218 -238
+40
arch/arm/mach-sa1100/assabet.c
··· 20 20 #include <linux/delay.h> 21 21 #include <linux/mm.h> 22 22 23 + #include <video/sa1100fb.h> 24 + 23 25 #include <mach/hardware.h> 24 26 #include <asm/mach-types.h> 25 27 #include <asm/irq.h> ··· 206 204 .sclk_rate = 11981000, 207 205 }; 208 206 207 + #ifndef ASSABET_PAL_VIDEO 208 + /* 209 + * The assabet uses a sharp LQ039Q2DS54 LCD module. It is actually 210 + * takes an RGB666 signal, but we provide it with an RGB565 signal 211 + * instead (def_rgb_16). 212 + */ 213 + static struct sa1100fb_mach_info lq039q2ds54_info = { 214 + .pixclock = 171521, .bpp = 16, 215 + .xres = 320, .yres = 240, 216 + 217 + .hsync_len = 5, .vsync_len = 1, 218 + .left_margin = 61, .upper_margin = 3, 219 + .right_margin = 9, .lower_margin = 0, 220 + 221 + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 222 + 223 + .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 224 + .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2), 225 + }; 226 + #else 227 + static struct sa1100fb_mach_info pal_info = { 228 + .pixclock = 67797, .bpp = 16, 229 + .xres = 640, .yres = 512, 230 + 231 + .hsync_len = 64, .vsync_len = 6, 232 + .left_margin = 125, .upper_margin = 70, 233 + .right_margin = 115, .lower_margin = 36, 234 + 235 + .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 236 + .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(512), 237 + }; 238 + #endif 239 + 209 240 static void __init assabet_init(void) 210 241 { 211 242 /* ··· 284 249 #endif 285 250 } 286 251 252 + #ifndef ASSABET_PAL_VIDEO 253 + sa11x0_register_lcd(&lq039q2ds54_info); 254 + #else 255 + sa11x0_register_lcd(&pal_video); 256 + #endif 287 257 sa11x0_register_mtd(&assabet_flash_data, assabet_flash_resources, 288 258 ARRAY_SIZE(assabet_flash_resources)); 289 259 sa11x0_register_irda(&assabet_irda_data);
+17
arch/arm/mach-sa1100/collie.c
··· 28 28 #include <linux/gpio.h> 29 29 #include <linux/pda_power.h> 30 30 31 + #include <video/sa1100fb.h> 32 + 31 33 #include <mach/hardware.h> 32 34 #include <asm/mach-types.h> 33 35 #include <asm/irq.h> ··· 312 310 } 313 311 }; 314 312 313 + static struct sa1100fb_mach_info collie_lcd_info = { 314 + .pixclock = 171521, .bpp = 16, 315 + .xres = 320, .yres = 240, 316 + 317 + .hsync_len = 5, .vsync_len = 1, 318 + .left_margin = 11, .upper_margin = 2, 319 + .right_margin = 30, .lower_margin = 0, 320 + 321 + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 322 + 323 + .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 324 + .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2), 325 + }; 326 + 315 327 static void __init collie_init(void) 316 328 { 317 329 int ret = 0; ··· 364 348 printk(KERN_WARNING "collie: Unable to register LoCoMo device\n"); 365 349 } 366 350 351 + sa11x0_register_lcd(&collie_lcd_info); 367 352 sa11x0_register_mtd(&collie_flash_data, collie_flash_resources, 368 353 ARRAY_SIZE(collie_flash_resources)); 369 354 sa11x0_register_mcp(&collie_mcp_data);
+7 -1
arch/arm/mach-sa1100/generic.c
··· 19 19 #include <linux/ioport.h> 20 20 #include <linux/platform_device.h> 21 21 22 + #include <video/sa1100fb.h> 23 + 22 24 #include <asm/div64.h> 23 25 #include <mach/hardware.h> 24 26 #include <asm/system.h> ··· 296 294 .resource = sa11x0fb_resources, 297 295 }; 298 296 297 + void sa11x0_register_lcd(struct sa1100fb_mach_info *inf) 298 + { 299 + sa11x0_register_device(&sa11x0fb_device, inf); 300 + } 301 + 299 302 static struct platform_device sa11x0pcmcia_device = { 300 303 .name = "sa11x0-pcmcia", 301 304 .id = -1, ··· 363 356 &sa11x0uart3_device, 364 357 &sa11x0ssp_device, 365 358 &sa11x0pcmcia_device, 366 - &sa11x0fb_device, 367 359 &sa11x0rtc_device, 368 360 }; 369 361
+3
arch/arm/mach-sa1100/generic.h
··· 40 40 41 41 struct mcp_plat_data; 42 42 void sa11x0_register_mcp(struct mcp_plat_data *data); 43 + 44 + struct sa1100fb_mach_info; 45 + void sa11x0_register_lcd(struct sa1100fb_mach_info *inf);
+20 -2
arch/arm/mach-sa1100/h3100.c
··· 14 14 #include <linux/kernel.h> 15 15 #include <linux/gpio.h> 16 16 17 + #include <video/sa1100fb.h> 18 + 17 19 #include <asm/mach-types.h> 18 20 #include <asm/mach/arch.h> 19 21 #include <asm/mach/irda.h> ··· 38 36 } 39 37 } 40 38 39 + static struct sa1100fb_mach_info h3100_lcd_info = { 40 + .pixclock = 406977, .bpp = 4, 41 + .xres = 320, .yres = 240, 42 + 43 + .hsync_len = 26, .vsync_len = 41, 44 + .left_margin = 4, .upper_margin = 0, 45 + .right_margin = 4, .lower_margin = 0, 46 + 47 + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 48 + .cmap_greyscale = 1, 49 + .cmap_inverse = 1, 50 + 51 + .lccr0 = LCCR0_Mono | LCCR0_4PixMono | LCCR0_Sngl | LCCR0_Pas, 52 + .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2), 53 + }; 41 54 42 55 static void __init h3100_map_io(void) 43 56 { 44 57 h3xxx_map_io(); 45 - 46 - sa1100fb_lcd_power = h3100_lcd_power; 47 58 48 59 /* Older bootldrs put GPIO2-9 in alternate mode on the 49 60 assumption that they are used for video */ ··· 95 80 { 96 81 h3xxx_init_gpio(h3100_default_gpio, ARRAY_SIZE(h3100_default_gpio)); 97 82 h3xxx_mach_init(); 83 + 84 + sa1100fb_lcd_power = h3100_lcd_power; 85 + sa11x0_register_lcd(&h3100_lcd_info); 98 86 sa11x0_register_irda(&h3100_irda_data); 99 87 } 100 88
+29 -2
arch/arm/mach-sa1100/h3600.c
··· 14 14 #include <linux/kernel.h> 15 15 #include <linux/gpio.h> 16 16 17 + #include <video/sa1100fb.h> 18 + 17 19 #include <asm/mach-types.h> 18 20 #include <asm/mach/arch.h> 19 21 #include <asm/mach/irda.h> ··· 58 56 err1: return; 59 57 } 60 58 59 + static const struct sa1100fb_rgb h3600_rgb_16 = { 60 + .red = { .offset = 12, .length = 4, }, 61 + .green = { .offset = 7, .length = 4, }, 62 + .blue = { .offset = 1, .length = 4, }, 63 + .transp = { .offset = 0, .length = 0, }, 64 + }; 65 + 66 + static struct sa1100fb_mach_info h3600_lcd_info = { 67 + .pixclock = 174757, .bpp = 16, 68 + .xres = 320, .yres = 240, 69 + 70 + .hsync_len = 3, .vsync_len = 3, 71 + .left_margin = 12, .upper_margin = 10, 72 + .right_margin = 17, .lower_margin = 1, 73 + 74 + .cmap_static = 1, 75 + 76 + .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 77 + .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2), 78 + 79 + .rgb[RGB_16] = &h3600_rgb_16, 80 + }; 81 + 82 + 61 83 static void __init h3600_map_io(void) 62 84 { 63 85 h3xxx_map_io(); 64 - 65 - sa1100fb_lcd_power = h3600_lcd_power; 66 86 } 67 87 68 88 /* ··· 145 121 { 146 122 h3xxx_init_gpio(h3600_default_gpio, ARRAY_SIZE(h3600_default_gpio)); 147 123 h3xxx_mach_init(); 124 + 125 + sa1100fb_lcd_power = h3600_lcd_power; 126 + sa11x0_register_lcd(&h3600_lcd_info); 148 127 sa11x0_register_irda(&h3600_irda_data); 149 128 } 150 129
+79
arch/arm/mach-sa1100/lart.c
··· 6 6 #include <linux/kernel.h> 7 7 #include <linux/tty.h> 8 8 9 + #include <video/sa1100fb.h> 10 + 9 11 #include <mach/hardware.h> 10 12 #include <asm/setup.h> 11 13 #include <asm/mach-types.h> ··· 28 26 .sclk_rate = 11981000, 29 27 }; 30 28 29 + #ifdef LART_GREY_LCD 30 + static struct sa1100fb_mach_info lart_grey_info = { 31 + .pixclock = 150000, .bpp = 4, 32 + .xres = 320, .yres = 240, 33 + 34 + .hsync_len = 1, .vsync_len = 1, 35 + .left_margin = 4, .upper_margin = 0, 36 + .right_margin = 2, .lower_margin = 0, 37 + 38 + .cmap_greyscale = 1, 39 + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 40 + 41 + .lccr0 = LCCR0_Mono | LCCR0_Sngl | LCCR0_Pas | LCCR0_4PixMono, 42 + .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(512), 43 + }; 44 + #endif 45 + #ifdef LART_COLOR_LCD 46 + static struct sa1100fb_mach_info lart_color_info = { 47 + .pixclock = 150000, .bpp = 16, 48 + .xres = 320, .yres = 240, 49 + 50 + .hsync_len = 2, .vsync_len = 3, 51 + .left_margin = 69, .upper_margin = 14, 52 + .right_margin = 8, .lower_margin = 4, 53 + 54 + .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 55 + .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | LCCR3_ACBsDiv(512), 56 + }; 57 + #endif 58 + #ifdef LART_VIDEO_OUT 59 + static struct sa1100fb_mach_info lart_video_info = { 60 + .pixclock = 39721, .bpp = 16, 61 + .xres = 640, .yres = 480, 62 + 63 + .hsync_len = 95, .vsync_len = 2, 64 + .left_margin = 40, .upper_margin = 32, 65 + .right_margin = 24, .lower_margin = 11, 66 + 67 + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 68 + 69 + .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 70 + .lccr3 = LCCR3_OutEnL | LCCR3_PixFlEdg | LCCR3_ACBsDiv(512), 71 + }; 72 + #endif 73 + 74 + #ifdef LART_KIT01_LCD 75 + static struct sa1100fb_mach_info lart_kit01_info = { 76 + .pixclock = 63291, .bpp = 16, 77 + .xres = 640, .yres = 480, 78 + 79 + .hsync_len = 64, .vsync_len = 3, 80 + .left_margin = 122, .upper_margin = 45, 81 + .right_margin = 10, .lower_margin = 10, 82 + 83 + .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 84 + .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg 85 + }; 86 + #endif 87 + 31 88 static void __init lart_init(void) 32 89 { 90 + struct sa1100fb_mach_info *inf = NULL; 91 + 92 + #ifdef LART_GREY_LCD 93 + inf = &lart_grey_info; 94 + #endif 95 + #ifdef LART_COLOR_LCD 96 + inf = &lart_color_info; 97 + #endif 98 + #ifdef LART_VIDEO_OUT 99 + inf = &lart_video_info; 100 + #endif 101 + #ifdef LART_KIT01_LCD 102 + inf = &lart_kit01_info; 103 + #endif 104 + 105 + if (inf) 106 + sa11x0_register_lcd(inf); 107 + 33 108 sa11x0_register_mcp(&lart_mcp_data); 34 109 } 35 110
+17
arch/arm/mach-sa1100/shannon.c
··· 9 9 #include <linux/mtd/mtd.h> 10 10 #include <linux/mtd/partitions.h> 11 11 12 + #include <video/sa1100fb.h> 13 + 12 14 #include <mach/hardware.h> 13 15 #include <asm/mach-types.h> 14 16 #include <asm/setup.h> ··· 59 57 .sclk_rate = 11981000, 60 58 }; 61 59 60 + static struct sa1100fb_mach_info shannon_lcd_info = { 61 + .pixclock = 152500, .bpp = 8, 62 + .xres = 640, .yres = 480, 63 + 64 + .hsync_len = 4, .vsync_len = 3, 65 + .left_margin = 2, .upper_margin = 0, 66 + .right_margin = 1, .lower_margin = 0, 67 + 68 + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 69 + 70 + .lccr0 = LCCR0_Color | LCCR0_Dual | LCCR0_Pas, 71 + .lccr3 = LCCR3_ACBsDiv(512), 72 + }; 73 + 62 74 static void __init shannon_init(void) 63 75 { 76 + sa11x0_register_lcd(&shannon_lcd_info); 64 77 sa11x0_register_mtd(&shannon_flash_data, &shannon_flash_resource, 1); 65 78 sa11x0_register_mcp(&shannon_mcp_data); 66 79 }
+6 -233
drivers/video/sa1100fb.c
··· 218 218 .transp = { .offset = 0, .length = 0, }, 219 219 }; 220 220 221 - #ifdef CONFIG_SA1100_ASSABET 222 - #ifndef ASSABET_PAL_VIDEO 223 - /* 224 - * The assabet uses a sharp LQ039Q2DS54 LCD module. It is actually 225 - * takes an RGB666 signal, but we provide it with an RGB565 signal 226 - * instead (def_rgb_16). 227 - */ 228 - static struct sa1100fb_mach_info lq039q2ds54_info __devinitdata = { 229 - .pixclock = 171521, .bpp = 16, 230 - .xres = 320, .yres = 240, 231 221 232 - .hsync_len = 5, .vsync_len = 1, 233 - .left_margin = 61, .upper_margin = 3, 234 - .right_margin = 9, .lower_margin = 0, 235 - 236 - .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 237 - 238 - .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 239 - .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2), 240 - }; 241 - #else 242 - static struct sa1100fb_mach_info pal_info __devinitdata = { 243 - .pixclock = 67797, .bpp = 16, 244 - .xres = 640, .yres = 512, 245 - 246 - .hsync_len = 64, .vsync_len = 6, 247 - .left_margin = 125, .upper_margin = 70, 248 - .right_margin = 115, .lower_margin = 36, 249 - 250 - .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 251 - .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(512), 252 - }; 253 - #endif 254 - #endif 255 - 256 - #ifdef CONFIG_SA1100_H3600 257 - static const struct sa1100fb_rgb h3600_rgb_16 = { 258 - .red = { .offset = 12, .length = 4, }, 259 - .green = { .offset = 7, .length = 4, }, 260 - .blue = { .offset = 1, .length = 4, }, 261 - .transp = { .offset = 0, .length = 0, }, 262 - }; 263 - 264 - static struct sa1100fb_mach_info h3600_info __devinitdata = { 265 - .pixclock = 174757, .bpp = 16, 266 - .xres = 320, .yres = 240, 267 - 268 - .hsync_len = 3, .vsync_len = 3, 269 - .left_margin = 12, .upper_margin = 10, 270 - .right_margin = 17, .lower_margin = 1, 271 - 272 - .cmap_static = 1, 273 - 274 - .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 275 - .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2), 276 - 277 - .rgb[RGB_16] = &h3600_rgb_16, 278 - }; 279 - #endif 280 - 281 - #ifdef CONFIG_SA1100_H3100 282 - static struct sa1100fb_mach_info h3100_info __devinitdata = { 283 - .pixclock = 406977, .bpp = 4, 284 - .xres = 320, .yres = 240, 285 - 286 - .hsync_len = 26, .vsync_len = 41, 287 - .left_margin = 4, .upper_margin = 0, 288 - .right_margin = 4, .lower_margin = 0, 289 - 290 - .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 291 - .cmap_greyscale = 1, 292 - .cmap_inverse = 1, 293 - 294 - .lccr0 = LCCR0_Mono | LCCR0_4PixMono | LCCR0_Sngl | LCCR0_Pas, 295 - .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2), 296 - }; 297 - #endif 298 - 299 - #ifdef CONFIG_SA1100_COLLIE 300 - static struct sa1100fb_mach_info collie_info __devinitdata = { 301 - .pixclock = 171521, .bpp = 16, 302 - .xres = 320, .yres = 240, 303 - 304 - .hsync_len = 5, .vsync_len = 1, 305 - .left_margin = 11, .upper_margin = 2, 306 - .right_margin = 30, .lower_margin = 0, 307 - 308 - .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 309 - 310 - .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 311 - .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2), 312 - }; 313 - #endif 314 - 315 - #ifdef LART_GREY_LCD 316 - static struct sa1100fb_mach_info lart_grey_info __devinitdata = { 317 - .pixclock = 150000, .bpp = 4, 318 - .xres = 320, .yres = 240, 319 - 320 - .hsync_len = 1, .vsync_len = 1, 321 - .left_margin = 4, .upper_margin = 0, 322 - .right_margin = 2, .lower_margin = 0, 323 - 324 - .cmap_greyscale = 1, 325 - .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 326 - 327 - .lccr0 = LCCR0_Mono | LCCR0_Sngl | LCCR0_Pas | LCCR0_4PixMono, 328 - .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(512), 329 - }; 330 - #endif 331 - #ifdef LART_COLOR_LCD 332 - static struct sa1100fb_mach_info lart_color_info __devinitdata = { 333 - .pixclock = 150000, .bpp = 16, 334 - .xres = 320, .yres = 240, 335 - 336 - .hsync_len = 2, .vsync_len = 3, 337 - .left_margin = 69, .upper_margin = 14, 338 - .right_margin = 8, .lower_margin = 4, 339 - 340 - .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 341 - .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | LCCR3_ACBsDiv(512), 342 - }; 343 - #endif 344 - #ifdef LART_VIDEO_OUT 345 - static struct sa1100fb_mach_info lart_video_info __devinitdata = { 346 - .pixclock = 39721, .bpp = 16, 347 - .xres = 640, .yres = 480, 348 - 349 - .hsync_len = 95, .vsync_len = 2, 350 - .left_margin = 40, .upper_margin = 32, 351 - .right_margin = 24, .lower_margin = 11, 352 - 353 - .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 354 - 355 - .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 356 - .lccr3 = LCCR3_OutEnL | LCCR3_PixFlEdg | LCCR3_ACBsDiv(512), 357 - }; 358 - #endif 359 - 360 - #ifdef LART_KIT01_LCD 361 - static struct sa1100fb_mach_info lart_kit01_info __devinitdata = { 362 - .pixclock = 63291, .bpp = 16, 363 - .xres = 640, .yres = 480, 364 - 365 - .hsync_len = 64, .vsync_len = 3, 366 - .left_margin = 122, .upper_margin = 45, 367 - .right_margin = 10, .lower_margin = 10, 368 - 369 - .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 370 - .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg 371 - }; 372 - #endif 373 - 374 - #ifdef CONFIG_SA1100_SHANNON 375 - static struct sa1100fb_mach_info shannon_info __devinitdata = { 376 - .pixclock = 152500, .bpp = 8, 377 - .xres = 640, .yres = 480, 378 - 379 - .hsync_len = 4, .vsync_len = 3, 380 - .left_margin = 2, .upper_margin = 0, 381 - .right_margin = 1, .lower_margin = 0, 382 - 383 - .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 384 - 385 - .lccr0 = LCCR0_Color | LCCR0_Dual | LCCR0_Pas, 386 - .lccr3 = LCCR3_ACBsDiv(512), 387 - }; 388 - #endif 389 - 390 - 391 - 392 - static struct sa1100fb_mach_info * __devinit 393 - sa1100fb_get_machine_info(struct sa1100fb_info *fbi) 394 - { 395 - struct sa1100fb_mach_info *inf = NULL; 396 - 397 - /* 398 - * R G B T 399 - * default {11,5}, { 5,6}, { 0,5}, { 0,0} 400 - * h3600 {12,4}, { 7,4}, { 1,4}, { 0,0} 401 - * freebird { 8,4}, { 4,4}, { 0,4}, {12,4} 402 - */ 403 - #ifdef CONFIG_SA1100_ASSABET 404 - if (machine_is_assabet()) { 405 - #ifndef ASSABET_PAL_VIDEO 406 - inf = &lq039q2ds54_info; 407 - #else 408 - inf = &pal_info; 409 - #endif 410 - } 411 - #endif 412 - #ifdef CONFIG_SA1100_H3100 413 - if (machine_is_h3100()) { 414 - inf = &h3100_info; 415 - } 416 - #endif 417 - #ifdef CONFIG_SA1100_H3600 418 - if (machine_is_h3600()) { 419 - inf = &h3600_info; 420 - } 421 - #endif 422 - #ifdef CONFIG_SA1100_COLLIE 423 - if (machine_is_collie()) { 424 - inf = &collie_info; 425 - } 426 - #endif 427 - #ifdef CONFIG_SA1100_LART 428 - if (machine_is_lart()) { 429 - #ifdef LART_GREY_LCD 430 - inf = &lart_grey_info; 431 - #endif 432 - #ifdef LART_COLOR_LCD 433 - inf = &lart_color_info; 434 - #endif 435 - #ifdef LART_VIDEO_OUT 436 - inf = &lart_video_info; 437 - #endif 438 - #ifdef LART_KIT01_LCD 439 - inf = &lart_kit01_info; 440 - #endif 441 - } 442 - #endif 443 - #ifdef CONFIG_SA1100_SHANNON 444 - if (machine_is_shannon()) { 445 - inf = &shannon_info; 446 - } 447 - #endif 448 - return inf; 449 - } 450 222 451 223 static int sa1100fb_activate_var(struct fb_var_screeninfo *var, struct sa1100fb_info *); 452 224 static void set_ctrlr_state(struct sa1100fb_info *fbi, u_int state); ··· 1125 1353 1126 1354 static struct sa1100fb_info * __devinit sa1100fb_init_fbinfo(struct device *dev) 1127 1355 { 1128 - struct sa1100fb_mach_info *inf; 1356 + struct sa1100fb_mach_info *inf = dev->platform_data; 1129 1357 struct sa1100fb_info *fbi; 1130 1358 unsigned i; 1131 1359 ··· 1161 1389 fbi->rgb[RGB_4] = &rgb_4; 1162 1390 fbi->rgb[RGB_8] = &rgb_8; 1163 1391 fbi->rgb[RGB_16] = &def_rgb_16; 1164 - 1165 - inf = dev->platform_data; 1166 - if (!inf) 1167 - inf = sa1100fb_get_machine_info(fbi); 1168 1392 1169 1393 /* 1170 1394 * People just don't seem to get this. We don't support ··· 1214 1446 { 1215 1447 struct sa1100fb_info *fbi; 1216 1448 int ret, irq; 1449 + 1450 + if (!pdev->dev.platform_data) { 1451 + dev_err(&pdev->dev, "no platform LCD data\n"); 1452 + return -EINVAL; 1453 + } 1217 1454 1218 1455 irq = platform_get_irq(pdev, 0); 1219 1456 if (irq < 0)