fbcon: fix fbcon's setup routine
PATCH RESEND 1/3 fbcon: fix fbcon's setup routine
Fix fbcon's setup routine so usage is consistent with previous kernels.
Ie: video=ofonly and video=xxxfb:off should work.
This is done by fb_get_options() returning a nonzero value if:
- 'off' option is present
- 'ofonly' is present but driver name is not 'offb'
All drivers will not proceed with their initialization if return value is nonzero.
Signed-off-by Antonino Daplas <[email protected]>
---
drivers/video/68328fb.c | 6 +++- drivers/video/acornfb.c | 6 +++- drivers/video/amba-clcd.c | 2 + drivers/video/amifb.c | 6 +++- drivers/video/asiliantfb.c | 3 ++ drivers/video/aty/aty128fb.c | 11 +++++++- drivers/video/aty/atyfb_base.c | 22 ++++++++++------- drivers/video/aty/radeon_base.c | 6 +++- drivers/video/bw2.c | 3 ++ drivers/video/cg14.c | 3 ++ drivers/video/cg3.c | 3 ++ drivers/video/cg6.c | 3 ++ drivers/video/chipsfb.c | 3 ++ drivers/video/cirrusfb.c | 6 +++- drivers/video/clps711xfb.c | 3 ++ drivers/video/controlfb.c | 5 +++ drivers/video/cyber2000fb.c | 6 +++- drivers/video/dnfb.c | 3 ++ drivers/video/epson1355fb.c | 3 ++ drivers/video/fbmem.c | 44 ++++++++++++++++++++-------------- drivers/video/ffb.c | 3 ++ drivers/video/fm2fb.c | 6 +++- drivers/video/g364fb.c | 3 ++ drivers/video/gbefb.c | 6 +++- drivers/video/hgafb.c | 3 ++ drivers/video/hitfb.c | 3 ++ drivers/video/hpfb.c | 3 ++ drivers/video/i810/i810_main.c | 6 +++- drivers/video/igafb.c | 3 ++ drivers/video/imsttfb.c | 7 ++++- drivers/video/kyro/fbdev.c | 6 +++- drivers/video/leo.c | 3 ++ drivers/video/macfb.c | 5 +++ drivers/video/matrox/matroxfb_base.c | 6 +++- drivers/video/matrox/matroxfb_crtc2.c | 3 ++ drivers/video/maxinefb.c | 3 ++ drivers/video/neofb.c | 6 +++- drivers/video/offb.c | 5 +++ drivers/video/p9100.c | 3 ++ drivers/video/platinumfb.c | 6 +++- drivers/video/pm2fb.c | 6 +++- drivers/video/pmag-ba-fb.c | 3 ++ drivers/video/pmagb-b-fb.c | 3 ++ drivers/video/pvr2fb.c | 6 +++- drivers/video/pxafb.c | 6 +++- drivers/video/q40fb.c | 3 ++ drivers/video/radeonfb.c | 6 +++- drivers/video/riva/fbdev.c | 6 +++- drivers/video/sa1100fb.c | 3 ++ drivers/video/sgivwfb.c | 6 +++- drivers/video/sis/sis_main.c | 6 +++- drivers/video/skeletonfb.c | 6 +++- drivers/video/sstfb.c | 6 +++- drivers/video/stifb.c | 6 +++- drivers/video/tcx.c | 3 ++ drivers/video/tdfxfb.c | 7 ++++- drivers/video/tgafb.c | 6 +++- drivers/video/tridentfb.c | 6 +++- drivers/video/tx3912fb.c | 5 +++ drivers/video/valkyriefb.c | 5 +++ drivers/video/vesafb.c | 5 +++ drivers/video/vfb.c | 6 +++- drivers/video/vga16fb.c | 8 ++++-- include/linux/fb.h | 2 - 64 files changed, 298 insertions(+), 63 deletions(-)
drivers/video/68328fb.c +5 -1
@@ -440,7 +440,11 @@ int __init mc68x328fb_setup(char *optionint __init mc68x328fb_init (void ) {#ifndef MODULE -mc68x328fb_setup (fb_get_options ("68328fb" )); +char *option =NULL ; + +if (fb_get_options ("68328fb" , &option)) +return -ENODEV ; +mc68x328fb_setup (option);#endif /* * initialize the default mode from the LCD controller registers
drivers/video/acornfb.c +5 -1
@@ -1291,8 +1291,12 @@ acornfb_init(void)unsigned long size;u_int h_sync, v_sync;int rc, i; +char *option =NULL ; + +if (fb_get_options ("acornfb" , &option)) +return -ENODEV ; +acornfb_setup (option); -acornfb_setup (fb_get_options ("acornfb" ));acornfb_init_fbinfo (); current_par.dev = &acornfb_device;
drivers/video/amba-clcd.c +2 -0
@@ -496,6 +496,8 @@ static struct amba_driver clcd_driver =int __init amba_clcdfb_init (void ) { +if (fb_get_options ("ambafb" ,NULL )) +return -ENODEV ;return amba_driver_register (&clcd_driver); }
drivers/video/amifb.c +5 -1
@@ -2258,7 +2258,11 @@ int __init amifb_init(void)u_int defmode;#ifndef MODULE -amifb_setup (fb_get_options ("amifb" )); +char *option =NULL ; + +if (fb_get_options ("amifb" , &option)) +return -ENODEV ; +amifb_setup (option);#endif if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT (AMI_VIDEO ))return -ENXIO ;
drivers/video/asiliantfb.c +3 -0
@@ -609,6 +609,9 @@ static struct pci_driver asiliantfb_drivint __init asiliantfb_init (void ) { +if (fb_get_options ("asiliantfb" ,NULL )) +return -ENODEV ; +return pci_module_init (&asiliantfb_driver); }
drivers/video/aty/aty128fb.c +10 -1
@@ -2439,6 +2439,14 @@ static int aty128_pci_resume(struct pci_int __init aty128fb_init (void ) { +#ifndef MODULE +char *option =NULL ; + +if (fb_get_options ("aty128fb" , &option)) +return -ENODEV ; +aty128fb_setup (option); +#endif +return pci_module_init (&aty128fb_driver); }
@@ -2447,8 +2455,9 @@ static void __exit aty128fb_exit(void)pci_unregister_driver (&aty128fb_driver); } -#ifdef MODULE module_init (aty128fb_init); + +#ifdef MODULE module_exit (aty128fb_exit);MODULE_AUTHOR ("(c)1999-2003 Brad Douglas <[email protected]>" );
drivers/video/aty/atyfb_base.c +14 -8
@@ -1902,7 +1902,7 @@ static int __init aty_init(struct fb_infreturn 1 ; } -int __init atyfb_init (void ) +int __init atyfb_do_init (void ) {#if defined(CONFIG_PCI )unsigned long addr, res_start, res_size;
@@ -1920,13 +1920,6 @@ int __init atyfb_init(void)#else u16 tmp;#endif -#endif - -#ifndef MODULE -atyfb_setup (fb_get_options ("atyfb" )); -#endif - -#if defined(CONFIG_PCI )#ifdef __sparc__/* Do not attach when we have a serial console. */
@@ -2386,6 +2379,19 @@ int __init atyfb_init(void)return 0 ; } +int __init atyfb_init (void ) +{ +#ifndef MODULE +char *option =NULL ; + +if (fb_get_options ("atyfb" , &option)) +return -ENODEV ; +atyfb_setup (option); +#endif +return atyfb_do_init (); +} + +#ifndef MODULE int __init atyfb_setup (char *options) {
drivers/video/aty/radeon_base.c +5 -1
@@ -2373,7 +2373,11 @@ int __init radeonfb_setup (char *optionsint __init radeonfb_init (void ) {#ifndef MODULE -radeonfb_setup (fb_get_options ("radeonfb" )); +char *option =NULL ; + +if (fb_get_options ("radeonfb" , &option)) +return -ENODEV ; +radeonfb_setup (option);#endif return pci_module_init (&radeonfb_driver); }
drivers/video/bw2.c +3 -0
@@ -386,6 +386,9 @@ int __init bw2_init(void)struct sbus_bus *sbus;struct sbus_dev *sdev; +if (fb_get_options ("bw2fb" , &option)) +return -ENODEV ; +#ifdef CONFIG_SUN4 bw2_init_one (NULL );#endif
drivers/video/cg14.c +3 -0
@@ -584,6 +584,9 @@ int __init cg14_init(void)struct sbus_bus *sbus;struct sbus_dev *sdev; +if (fb_get_options ("cg14fb" ,NULL )) +return -ENODEV ; +#ifdef CONFIG_SPARC32 {int root, node;
drivers/video/cg3.c +3 -0
@@ -444,6 +444,9 @@ int __init cg3_init(void)struct sbus_bus *sbus;struct sbus_dev *sdev; +if (fb_get_options ("cg3fb" ,NULL )) +return -ENODEV ; + for_all_sbusdev(sdev, sbus) {if (!strcmp (sdev->prom_name,"cgthree" ) || !strcmp (sdev->prom_name,"cgRDI" ))
drivers/video/cg6.c +3 -0
@@ -760,6 +760,9 @@ int __init cg6_init(void)struct sbus_bus *sbus;struct sbus_dev *sdev; +if (fb_get_options ("cg6fb" ,NULL )) +return -ENODEV ; + for_all_sbusdev(sdev, sbus) {if (!strcmp (sdev->prom_name,"cgsix" ) || !strcmp (sdev->prom_name,"cgthree+" ))
drivers/video/chipsfb.c +3 -0
@@ -462,6 +462,9 @@ static struct pci_driver chipsfb_driverint __init chips_init (void ) { +if (fb_get_options ("chipsfb" ,NULL )) +return -ENODEV ; +return pci_module_init (&chipsfb_driver); }
drivers/video/cirrusfb.c +5 -1
@@ -2607,7 +2607,11 @@ int __init cirrusfb_init(void)int error =0 ;#ifndef MODULE -cirrusfb_setup (fb_get_options ("cirrusfb" )); +char *option =NULL ; + +if (fb_get_options ("cirrusfb" , &option)) +return -ENODEV ; +cirrusfb_setup (option);#endif #ifdef CONFIG_ZORRO
drivers/video/clps711xfb.c +3 -0
@@ -364,6 +364,9 @@ int __init clps711xfb_init(void) {int err = -ENOMEM ; +if (fb_get_options ("clps711xfb" ,NULL )) +return -ENODEV ; + cfb =kmalloc (sizeof (*cfb),GFP_KERNEL );if (!cfb) goto out;
drivers/video/controlfb.c +4 -1
@@ -556,8 +556,11 @@ static void control_set_hardware(structint __init control_init (void ) {struct device_node *dp; +char *option =NULL ; -control_setup (fb_get_options ("controlfb" )); +if (fb_get_options ("controlfb" , &option)) +return -ENODEV ; +control_setup (option); dp =find_devices ("control" );if (dp !=0 && !control_of_init (dp))
drivers/video/cyber2000fb.c +5 -1
@@ -1722,7 +1722,11 @@ int __init cyber2000fb_init(void)int ret =-1 , err;#ifndef MODULE -cyber2000fb_setup (fb_get_options ("cyber200fb" )); +char *option =NULL ; + +if (fb_get_options ("cyber2000fb" ,NULL )) +return -ENODEV ; +cyber2000fb_setup (option);#endif #ifdef CONFIG_ARCH_SHARK
drivers/video/dnfb.c +3 -0
@@ -284,6 +284,9 @@ int __init dnfb_init(void) {int ret; +if (fb_get_options ("dnfb" ,NULL )) +return -ENODEV ; + ret =driver_register (&dnfb_driver);if (!ret) {
drivers/video/epson1355fb.c +3 -0
@@ -740,6 +740,9 @@ int __init epson1355fb_init(void) {int ret =0 ; +if (fb_get_options ("epson1355fb" ,NULL )) +return -ENODEV ; + ret =driver_register (&epson1355fb_driver);if (!ret) { ret =platform_device_register (&epson1355fb_device);
drivers/video/fbmem.c +26 -18
68 lines not on this page · raw message
drivers/video/ffb.c +3 -0
@@ -1049,6 +1049,9 @@ int __init ffb_init(void) {int root; +if (fb_get_options ("ffb" ,NULL )) +return -ENODEV ; +ffb_scan_siblings (prom_root_node); root =prom_getchild (prom_root_node);
drivers/video/fm2fb.c +5 -1
@@ -296,7 +296,11 @@ int __init fm2fb_setup(char *options);int __init fm2fb_init (void ) { -fm2fb_setup (fb_get_options ("fb2fb" )); +char *option =NULL ; + +if (fb_get_options ("fm2fb" , &option)) +return -ENODEV ; +fm2fb_setup (option);return zorro_register_driver (&fm2fb_driver); }
drivers/video/g364fb.c +3 -0
@@ -202,6 +202,9 @@ int __init g364fb_init(void) (volatile unsigned int *)CURS_PAL_REG ;int mem, i, j; +if (fb_get_options ("g364fb" ,NULL )) +return -ENODEV ; +/* TBD: G364 detection */ /* get the resolution set by ARC console */
drivers/video/gbefb.c +5 -1
@@ -1084,7 +1084,11 @@ int __init gbefb_init(void)int i, ret =0 ;#ifndef MODULE -gbefb_setup (fb_get_options ("gbefb" )); +char *option =NULL ; + +if (fb_get_options ("gbefb" , &option)) +return -ENODEV ; +gbefb_setup (options);#endif if (!request_mem_region (GBE_BASE ,sizeof (struct sgi_gbe ),"GBE" )) {
drivers/video/hgafb.c +3 -0
@@ -547,6 +547,9 @@ static struct fb_ops hgafb_ops = {int __init hgafb_init (void ) { +if (fb_get_options ("hgafb" ,NULL )) +return -ENODEV ; +if (!hga_card_detect ()) {printk (KERN_INFO "hgafb: HGA card not detected.\n" );return -EINVAL ;
drivers/video/hitfb.c +3 -0
@@ -270,6 +270,9 @@ int __init hitfb_init(void)unsigned short lcdclor, ldr3, ldvndr;int size; +if (fb_get_options ("hitfb" ,NULL )) +return -ENODEV ; + hitfb_fix.smem_start =CONFIG_HD64461_IOBASE +0x02000000 ; hitfb_fix.smem_len = (MACH_HP690 ) ?1024 *1024 :512 *1024 ;
drivers/video/hpfb.c +3 -0
@@ -115,6 +115,9 @@ int __init hpfb_init_one(unsigned long b {unsigned long fboff; +if (fb_get_options ("hpfb" ,NULL )) +return -ENODEV ; + fboff = (in_8 (base +TOPCAT_FBOMSB ) <<8 ) |in_8 (base +TOPCAT_FBOLSB ); hpfb_fix.smem_start =0xf0000000 | (in_8 (base + fboff) <<16 );
drivers/video/i810/i810_main.c +5 -1
@@ -1980,7 +1980,11 @@ static void __exit i810fb_remove_pci(str#ifndef MODULE int __init i810fb_init (void ) { -i810fb_setup (fb_get_options ("i810fb" )); +char *option =NULL ; + +if (fb_get_options ("i810fb" , &option)) +return -ENODEV ; +i810fb_setup (option);if (pci_register_driver (&i810fb_driver) >0 )return 0 ;
drivers/video/igafb.c +3 -0
@@ -381,6 +381,9 @@ int __init igafb_init(void)unsigned long addr;int size, iga2000 =0 ; +if (fb_get_options ("igafb" ,NULL )) +return -ENODEV ; +/* Do not attach when we have a serial console. */ if (!con_is_present ())return -ENXIO ;
drivers/video/imsttfb.c +6 -1
@@ -1604,7 +1604,12 @@ imsttfb_setup(char *options)int __init imsttfb_init (void ) {#ifndef MODULE -imsttfb_setup (fb_get_options ("imsttfb" )); +char *option =NULL ; + +if (fb_get_options ("imsttfb" , &option)) +return -ENODEV ; + +imsttfb_setup (option);#endif return pci_module_init (&imsttfb_pci_driver); }
drivers/video/kyro/fbdev.c +5 -1
@@ -789,7 +789,11 @@ static void __devexit kyrofb_remove(struint __init kyrofb_init (void ) {#ifndef MODULE -kyrofb_setup (fb_get_options ("kyrofb" )); +char *option =NULL ; + +if (fb_get_options ("kyrofb" , &option)) +return -ENODEV ; +kyrofb_setup (option);#endif return pci_module_init (&kyrofb_pci_driver); }
drivers/video/leo.c +3 -0
@@ -626,6 +626,9 @@ int __init leo_init(void)struct sbus_bus *sbus;struct sbus_dev *sdev; +if (fb_get_options ("leofb" ,NULL )) +return -ENODEV ; + for_all_sbusdev(sdev, sbus) {if (!strcmp (sdev->prom_name,"leo" ))leo_init_one (sdev);
drivers/video/macfb.c +4 -1
@@ -614,8 +614,11 @@ void __init macfb_init(void) {int video_cmap_len, video_is_nubus =0 ;struct nubus_dev * ndev =NULL ; +char *option =NULL ; -macfb_setup (fb_get_options ("macfb" )); +if (fb_get_options ("macfb" , &option)) +return -ENODEV ; +macfb_setup (option);if (!MACH_IS_MAC )return ;
drivers/video/matrox/matroxfb_base.c +5 -1
@@ -2416,9 +2416,13 @@ static int __initdata initialized = 0;int __init matroxfb_init (void ) { +char *option =NULL ; + DBG(__FUNCTION__) - matroxfb_setup(fb_get_options("matroxfb")); + if (fb_get_options("matroxfb", &option)) + return -ENODEV; +matroxfb_setup (option);if (disabled)return -ENXIO ;
drivers/video/matrox/matroxfb_crtc2.c +3 -0
@@ -721,6 +721,9 @@ static struct matroxfb_driver crtc2 = { .remove = matroxfb_crtc2_remove };static int matroxfb_crtc2_init (void ) { +if (fb_get_options ("matrox_crtc2fb" ,NULL )) +return -ENODEV ; +matroxfb_register_driver (&crtc2);return 0 ; }
drivers/video/maxinefb.c +3 -0
@@ -126,6 +126,9 @@ int __init maxinefb_init(void)unsigned long fb_start;int i; +if (fb_get_options ("maxinefb" ,NULL )) +return -ENODEV ; +/* Validate we're on the proper machine type */ if (mips_machtype !=MACH_DS5000_XX ) {return -EINVAL ;
drivers/video/neofb.c +5 -1
@@ -2268,7 +2268,11 @@ int __init neofb_setup(char *options)int __init neofb_init (void ) {#ifndef MODULE -neofb_setup (fb_get_options ("neofb" )); +char *option =NULL ; + +if (fb_get_options ("neofb" , &option)) +return -ENODEV ; +neofb_setup (option);#endif return pci_register_driver (&neofb_driver); }
drivers/video/offb.c +5 -0
@@ -247,10 +247,15 @@ int __init offb_init(void) {struct device_node *dp;unsigned int dpy; +char *option =NULL ;#if defined(CONFIG_BOOTX_TEXT ) && defined(CONFIG_PPC32 )struct device_node *displays =find_type_devices ("display" );struct device_node *macos_display =NULL ; +#endif +if (fb_get_options ("offb" ,NULL )) +return -ENODEV ; +#if defined(CONFIG_BOOTX_TEXT ) && defined(CONFIG_PPC32 )/* If we're booted from BootX... */ if (prom_num_displays ==0 && boot_infos !=0 ) { unsigned long addr =
drivers/video/p9100.c +3 -0
@@ -340,6 +340,9 @@ int __init p9100_init(void)struct sbus_bus *sbus;struct sbus_dev *sdev; +if (fb_get_options ("p9100fb" ,NULL )) +return -ENODEV ; + for_all_sbusdev(sdev, sbus) {if (!strcmp (sdev->prom_name,"p9100" ))p9100_init_one (sdev);
drivers/video/platinumfb.c +5 -1
@@ -668,7 +668,11 @@ static struct of_platform_driver platinuint __init platinumfb_init (void ) {#ifndef MODULE -platinumfb_setup (fb_get_options ("platinumfb" )); +char *option =NULL ; + +if (fb_get_options ("platinumfb" , &option)) +return -ENODEV ; +platinumfb_setup (option);#endif of_register_driver (&platinum_driver);
drivers/video/pm2fb.c +5 -1
@@ -1220,7 +1220,11 @@ int __init pm2fb_setup(char *options);int __init pm2fb_init (void ) {#ifndef MODULE -pm2fb_setup (fb_get_options ("pm2fb" )); +char *option =NULL ; + +if (fb_get_options ("pm2fb" , &option)) +return -ENODEV ; +pm2fb_setup (option);#endif return pci_module_init (&pm2fb_driver);
drivers/video/pmag-ba-fb.c +3 -0
@@ -160,6 +160,9 @@ int __init pmagbafb_init(void)int sid;int found =0 ; +if (fb_get_options ("pmagbafb" ,NULL )) +return -ENODEV ; +if (TURBOCHANNEL ) {while ((sid =search_tc_card ("PMAG-BA" )) >=0 ) { found =1 ;
drivers/video/pmagb-b-fb.c +3 -0
@@ -163,6 +163,9 @@ int __init pmagbbfb_init(void)int sid;int found =0 ; +if (fb_get_options ("pmagbbfb" ,NULL )) +return -ENODEV ; +if (TURBOCHANNEL ) {while ((sid =search_tc_card ("PMAGB-BA" )) >=0 ) { found =1 ;
drivers/video/pvr2fb.c +5 -1
@@ -1059,7 +1059,11 @@ int __init pvr2fb_init(void)int size;#ifndef MODULE -pvr2fb_setup (fb_get_options ("pvr2fb" )); +char *option =NULL ; + +if (fb_get_options ("pvr2fb" , &option)) +return -ENODEV ; +pvr2fb_setup (option);#endif size =sizeof (struct fb_info ) +sizeof (struct pvr2fb_par ) +16 *sizeof (u32);
drivers/video/pxafb.c +5 -1
@@ -1377,7 +1377,11 @@ MODULE_PARM_DESC(options, "LCD parameterint __devinit pxafb_init (void ) {#ifndef MODULE -pxafb_setup (fb_get_options ("pxafb" )); +char *option =NULL ; + +if (fb_get_options ("pxafb" , &option)) +return -ENODEV ; +pxafb_setup (option);#endif return driver_register (&pxafb_driver); }
drivers/video/q40fb.c +3 -0
@@ -143,6 +143,9 @@ int __init q40fb_init(void) {int ret =0 ; +if (fb_get_options ("q40fb" ,NULL )) +return -ENODEV ; + ret =driver_register (&q40fb_driver);if (!ret) {
drivers/video/radeonfb.c +5 -1
@@ -3137,7 +3137,11 @@ int __init radeonfb_old_setup (char *optint __init radeonfb_old_init (void ) {#ifndef MODULE -radeonfb_old_setup (fb_get_options ("radeonfb_old" )); +char *option =NULL ; + +if (fb_get_options ("radeonfb_old" , &option)) +return -ENODEV ; +radeonfb_old_setup (option);#endif return pci_module_init (&radeonfb_driver); }
drivers/video/riva/fbdev.c +5 -1
@@ -2133,7 +2133,11 @@ static struct pci_driver rivafb_driver =int __devinit rivafb_init (void ) {#ifndef MODULE -rivafb_setup (fb_get_options ("rivafb" )); +char *option =NULL ; + +if (fb_get_options ("rivafb" , &option)) +return -ENODEV ; +rivafb_setup (option);#endif if (pci_register_driver (&rivafb_driver) >0 )return 0 ;
drivers/video/sa1100fb.c +3 -0
@@ -1804,6 +1804,9 @@ static struct device_driver sa1100fb_driint __init sa1100fb_init (void ) { +if (fb_get_options ("sa1100fb" ,NULL )) +return -ENODEV ; +return driver_register (&sa1100fb_driver); }
drivers/video/sgivwfb.c +5 -1
@@ -870,7 +870,11 @@ int __init sgivwfb_init(void)int ret;#ifndef MODULE -sgivwfb_setup (fb_get_options ("sgivwfb" )); +char *option =NULL ; + +if (fb_get_options ("sgivwfb" , &option)) +return -ENODEV ; +sgivwfb_setup (option);#endif ret =driver_register (&sgivwfb_driver);if (!ret) {
drivers/video/sis/sis_main.c +5 -1
@@ -5720,7 +5720,11 @@ int __init sisfb_init(void) {#if LINUX_VERSION_CODE >KERNEL_VERSION (2 ,6 ,8 )#ifndef MODULE -sisfb_setup (fb_get_options ("sisfb" )); +char *option =NULL ; + +if (fb_get_options ("sisfb" , &option)) +return -ENODEV ; +sisfb_setup (option);#endif #endif return (pci_module_init (&sisfb_driver));
drivers/video/skeletonfb.c +5 -1
@@ -586,7 +586,11 @@ static void __exit xxxfb_cleanup(void)* For kernel boot options (in 'video=xxxfb:<options>' format) */ #ifndef MODULE -xxxfb_setup (fb_get_options ("xxxfb" )); +char *option =NULL ; + +if (fb_get_options ("xxxfb" , &option)) +return -ENODEV ; +xxxfb_setup (option);#endif /*
drivers/video/sstfb.c +5 -1
@@ -1573,7 +1573,11 @@ static struct pci_driver sstfb_driver =int __devinit sstfb_init (void ) {#ifndef MODULE -sstfb_setup (fb_get_options ("sstfb" )); +char *option =NULL ; + +if (fb_get_options ("sstfb" , &option)) +return -ENODEV ; +sstfb_setup (option);#endif return pci_module_init (&sstfb_driver); }
drivers/video/stifb.c +5 -1
@@ -1386,7 +1386,11 @@ stifb_init(void)int i;#ifndef MODULE -stifb_setup (fb_get_options ("stifb" )); +char *option =NULL ; + +if (fb_get_options ("stifb" , &option)) +return -ENODEV ; +stifb_setup (option);#endif if (stifb_disabled) {printk (KERN_INFO "stifb: disabled by \"stifb=off\" kernel parameter\n" );
drivers/video/tcx.c +3 -0
@@ -468,6 +468,9 @@ int __init tcx_init(void)struct sbus_bus *sbus;struct sbus_dev *sdev; +if (fb_get_options ("tcxfb" ,NULL )) +return -ENODEV ; + for_all_sbusdev(sdev, sbus) {if (!strcmp (sdev->prom_name,"tcx" ))tcx_init_one (sdev);
drivers/video/tdfxfb.c +6 -1
@@ -1359,7 +1359,12 @@ static void __devexit tdfxfb_remove(struint __init tdfxfb_init (void ) {#ifndef MODULE -tdfxfb_setup (fb_get_options ("tdfxfb" )); +char *option =NULL ; + +if (fb_get_options ("tdfxfb" , &option)) +return -ENODEV ; + +tdfxfb_setup (option);#endif return pci_module_init (&tdfxfb_driver); }
drivers/video/tgafb.c +5 -1
@@ -1528,7 +1528,11 @@ int __inittgafb_init (void) {#ifndef MODULE -tgafb_setup (fb_get_options ("tgafb" )); +char *option =NULL ; + +if (fb_get_options ("tgafb" , &option)) +return -ENODEV ; +tgafb_setup (option);#endif return pci_module_init (&tgafb_driver); }
drivers/video/tridentfb.c +5 -1
@@ -1224,7 +1224,11 @@ int tridentfb_setup(char *options);int __init tridentfb_init (void ) {#ifndef MODULE -tridentfb_setup (fb_get_options ("tridentfb" )); +char *option =NULL ; + +if (fb_get_options ("tridentfb" , &option)) +return -ENODEV ; +tridentfb_setup (option);#endif output ("Trident framebuffer %s initializing\n" ,VERSION );return pci_module_init (&tridentfb_pci_driver);
drivers/video/tx3912fb.c +4 -1
@@ -217,8 +217,11 @@ int __init tx3912fb_init(void) {u_long tx3912fb_paddr =0 ;int size = (info->var.bits_per_pixel ==8 ) ?256 :16 ; +char *option =NULL ; -tx3912fb_setup (fb_get_options ("tx3912fb" )); +if (fb_get_options ("tx3912fb" , &option)) +return -ENODEV ; +tx3912fb_setup (option);/* Disable the video logic */ outl(inl(TX3912_VIDEO_CTRL1) &
drivers/video/valkyriefb.c +4 -1
@@ -322,8 +322,11 @@ int __init valkyriefb_init(void)struct fb_info_valkyrie *p;unsigned long frame_buffer_phys, cmap_regs_phys, flags;int err; +char *option =NULL ; -valkyriefb_setup (fb_get_options ("valkyriefb" )); +if (fb_get_options ("valkyriefb" , &option)) +return -ENODEV ; +valkyriefb_setup (option);#ifdef CONFIG_MAC if (!MACH_IS_MAC )
drivers/video/vesafb.c +4 -1
@@ -410,8 +410,11 @@ static struct platform_device vesafb_devint __init vesafb_init (void ) {int ret; +char *option =NULL ; -vesafb_setup (fb_get_options ("vesafb" )); +/* ignore error return of fb_get_options */ +fb_get_options ("vesafb" , &option); +vesafb_setup (option); ret =driver_register (&vesafb_driver);if (!ret) {
drivers/video/vfb.c +5 -1
@@ -497,7 +497,11 @@ int __init vfb_init(void)int ret =0 ;#ifndef MODULE -vfb_setup (fb_get_options ("vfb" )); +char *option =NULL ; + +if (fb_get_options ("vfb" , &option)) +return -ENODEV ; +vfb_setup (option);#endif if (!vfb_enable)
drivers/video/vga16fb.c +6 -2
@@ -1342,9 +1342,13 @@ int __init vga16fb_init(void) {int i;int ret; -#ifndef MODULE -vga16fb_setup (fb_get_options ("vga16fb" )); +char *option =NULL ; + +if (fb_get_options ("vga16fb" , &option)) +return -ENODEV ; + +vga16fb_setup (option);#endif printk (KERN_DEBUG "vga16fb: initializing\n" );
include/linux/fb.h +1 -1
@@ -790,7 +790,7 @@ extern void fb_sysmove_buf_aligned(strucextern void fb_load_cursor_image (struct fb_info *);extern void fb_set_suspend (struct fb_info *info,int state);extern int fb_get_color_depth (struct fb_info *info); -extern char *fb_get_options (char *name); +extern int fb_get_options (char *name,char **option);extern struct fb_info *registered_fb[FB_MAX ];extern int num_registered_fb;
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php