summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-14 16:33:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-14 16:33:33 -0400
commit503f04530fec97f93673ae9048b5312cc4455cfe (patch)
tree7032c4a766b00e992eaf78f2f95f0f6bc4f4af6b
parent939ae58960bb5ce0c51776aec38877a401c03bcf (diff)
parent23e9f4ef99dd313fc8d19c326f6518459a402d71 (diff)
Merge tag 'fbdev-v4.14' of git://github.com/bzolnier/linux
Pull fbdev updates from Bartlomiej Zolnierkiewicz: - make fbcon a built-time depency for fbdev (fbcon was tristate option before, now it is a bool) - this is a first step in preparations for making console_lock usage saner (currently it acts like the BKL for all things fbdev/fbcon) (Daniel Vetter) - add fbcon=margin:<color> command line option to select the fbcon margin color (David Lechner) - add DMI quirk table for x86 systems which need fbcon rotation (devices like Asus T100HA, GPD Pocket, the GPD win and the I.T.Works TW891) (Hans de Goede) - fix 1bpp logo support for unusual width (needed by LEGO MINDSTORMS EV3) (David Lechner) - enable Xilinx FB driver for ARM ZynqMP platform (Michal Simek) - fix use after free in the error path of udlfb driver (Anton Vasilyev) - fix error return code handling in pxa3xx_gcu driver (Gustavo A. R. Silva) - fix bootparams.screeninfo arguments checking in vgacon (Jan H. Schönherr) - do not leak uninitialized padding in clk to userspace in the debug code of atyfb driver (Vladis Dronov) - fix compiler warnings in fbcon code and matroxfb driver (Arnd Bergmann) - convert fbdev susbsytem to using %pOF instead of full_name (Rob Herring) - structures constifications (Arvind Yadav, Bhumika Goyal, Gustavo A. R. Silva, Julia Lawall) - misc cleanups (Gustavo A. R. Silva, Hyun Kwon, Julia Lawall, Kuninori Morimoto, Lynn Lei) * tag 'fbdev-v4.14' of git://github.com/bzolnier/linux: (75 commits) video/console: Update BIOS dates list for GPD win console rotation DMI quirk video/console: Add rotated LCD-panel DMI quirk for the VIOS LTH17 video: fbdev: sis: fix duplicated code for different branches video: fbdev: make fb_var_screeninfo const video: fbdev: aty: do not leak uninitialized padding in clk to userspace vgacon: Prevent faulty bootparams.screeninfo from causing harm video: fbdev: make fb_videomode const video/console: Add new BIOS date for GPD pocket to dmi quirk table fbcon: remove restriction on margin color video: ARM CLCD: constify amba_id video: fm2fb: constify zorro_device_id video: fbdev: annotate fb_fix_screeninfo with const and __initconst omapfb: constify omap_video_timings structures video: fbdev: udlfb: Fix use after free on dlfb_usb_probe error path fbdev: i810: make fb_ops const fbdev: matrox: make fb_ops const video: fbdev: pxa3xx_gcu: fix error return code in pxa3xx_gcu_probe() video: fbdev: Enable Xilinx FB for ZynqMP video: fbdev: Fix multiple style issues in xilinxfb video: fbdev: udlfb: constify usb_device_id. ...
-rw-r--r--Documentation/fb/fbcon.txt7
-rw-r--r--drivers/video/console/Kconfig2
-rw-r--r--drivers/video/console/Makefile8
-rw-r--r--drivers/video/console/vgacon.c5
-rw-r--r--drivers/video/fbdev/68328fb.c2
-rw-r--r--drivers/video/fbdev/Kconfig2
-rw-r--r--drivers/video/fbdev/amba-clcd.c2
-rw-r--r--drivers/video/fbdev/arkfb.c2
-rw-r--r--drivers/video/fbdev/asiliantfb.c2
-rw-r--r--drivers/video/fbdev/atmel_lcdfb.c2
-rw-r--r--drivers/video/fbdev/aty/aty128fb.c4
-rw-r--r--drivers/video/fbdev/aty/atyfb_base.c6
-rw-r--r--drivers/video/fbdev/aty/radeon_base.c6
-rw-r--r--drivers/video/fbdev/bfin-lq035q1-fb.c2
-rw-r--r--drivers/video/fbdev/bw2.c4
-rw-r--r--drivers/video/fbdev/cg14.c4
-rw-r--r--drivers/video/fbdev/cg3.c4
-rw-r--r--drivers/video/fbdev/cg6.c4
-rw-r--r--drivers/video/fbdev/chipsfb.c4
-rw-r--r--drivers/video/fbdev/cobalt_lcdfb.c2
-rw-r--r--drivers/video/fbdev/core/Makefile14
-rw-r--r--drivers/video/fbdev/core/bitblit.c (renamed from drivers/video/console/bitblit.c)8
-rw-r--r--drivers/video/fbdev/core/fbcon.c (renamed from drivers/video/console/fbcon.c)37
-rw-r--r--drivers/video/fbdev/core/fbcon.h (renamed from drivers/video/console/fbcon.h)9
-rw-r--r--drivers/video/fbdev/core/fbcon_ccw.c (renamed from drivers/video/console/fbcon_ccw.c)8
-rw-r--r--drivers/video/fbdev/core/fbcon_cw.c (renamed from drivers/video/console/fbcon_cw.c)8
-rw-r--r--drivers/video/fbdev/core/fbcon_dmi_quirks.c145
-rw-r--r--drivers/video/fbdev/core/fbcon_rotate.c (renamed from drivers/video/console/fbcon_rotate.c)4
-rw-r--r--drivers/video/fbdev/core/fbcon_rotate.h (renamed from drivers/video/console/fbcon_rotate.h)0
-rw-r--r--drivers/video/fbdev/core/fbcon_ud.c (renamed from drivers/video/console/fbcon_ud.c)8
-rw-r--r--drivers/video/fbdev/core/fbmem.c12
-rw-r--r--drivers/video/fbdev/core/fbmon.c4
-rw-r--r--drivers/video/fbdev/core/softcursor.c (renamed from drivers/video/console/softcursor.c)4
-rw-r--r--drivers/video/fbdev/core/tileblit.c (renamed from drivers/video/console/tileblit.c)7
-rw-r--r--drivers/video/fbdev/cyber2000fb.c2
-rw-r--r--drivers/video/fbdev/da8xx-fb.c2
-rw-r--r--drivers/video/fbdev/dnfb.c2
-rw-r--r--drivers/video/fbdev/fb-puv3.c2
-rw-r--r--drivers/video/fbdev/ffb.c4
-rw-r--r--drivers/video/fbdev/fm2fb.c2
-rw-r--r--drivers/video/fbdev/geode/gxfb_core.c2
-rw-r--r--drivers/video/fbdev/grvga.c2
-rw-r--r--drivers/video/fbdev/i810/i810_main.c4
-rw-r--r--drivers/video/fbdev/imsttfb.c2
-rw-r--r--drivers/video/fbdev/intelfb/intelfbdrv.c2
-rw-r--r--drivers/video/fbdev/kyro/fbdev.c2
-rw-r--r--drivers/video/fbdev/leo.c4
-rw-r--r--drivers/video/fbdev/matrox/matroxfb_base.c14
-rw-r--r--drivers/video/fbdev/maxinefb.c2
-rw-r--r--drivers/video/fbdev/mb862xx/mb862xxfbdrv.c2
-rw-r--r--drivers/video/fbdev/mbx/mbxfb.c4
-rw-r--r--drivers/video/fbdev/neofb.c2
-rw-r--r--drivers/video/fbdev/nvidia/nvidia.c2
-rw-r--r--drivers/video/fbdev/offb.c10
-rw-r--r--drivers/video/fbdev/omap/lcd_mipid.c2
-rw-r--r--drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c2
-rw-r--r--drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c2
-rw-r--r--drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c2
-rw-r--r--drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c2
-rw-r--r--drivers/video/fbdev/omap2/omapfb/dss/dss-of.c3
-rw-r--r--drivers/video/fbdev/p9100.c4
-rw-r--r--drivers/video/fbdev/pm2fb.c2
-rw-r--r--drivers/video/fbdev/pm3fb.c2
-rw-r--r--drivers/video/fbdev/pmag-aa-fb.c4
-rw-r--r--drivers/video/fbdev/pmag-ba-fb.c4
-rw-r--r--drivers/video/fbdev/pmagb-b-fb.c4
-rw-r--r--drivers/video/fbdev/ps3fb.c2
-rw-r--r--drivers/video/fbdev/pvr2fb.c4
-rw-r--r--drivers/video/fbdev/pxa3xx-gcu.c4
-rw-r--r--drivers/video/fbdev/q40fb.c2
-rw-r--r--drivers/video/fbdev/riva/fbdev.c2
-rw-r--r--drivers/video/fbdev/s3fb.c2
-rw-r--r--drivers/video/fbdev/savage/savagefb_driver.c2
-rw-r--r--drivers/video/fbdev/sis/init301.c15
-rw-r--r--drivers/video/fbdev/skeletonfb.c4
-rw-r--r--drivers/video/fbdev/sm501fb.c2
-rw-r--r--drivers/video/fbdev/sm712fb.c17
-rw-r--r--drivers/video/fbdev/smscufx.c2
-rw-r--r--drivers/video/fbdev/sunxvr1000.c10
-rw-r--r--drivers/video/fbdev/sunxvr2500.c2
-rw-r--r--drivers/video/fbdev/sunxvr500.c2
-rw-r--r--drivers/video/fbdev/tcx.c4
-rw-r--r--drivers/video/fbdev/tdfxfb.c2
-rw-r--r--drivers/video/fbdev/tridentfb.c2
-rw-r--r--drivers/video/fbdev/udlfb.c5
-rw-r--r--drivers/video/fbdev/uvesafb.c2
-rw-r--r--drivers/video/fbdev/vermilion/vermilion.c4
-rw-r--r--drivers/video/fbdev/via/via-core.c2
-rw-r--r--drivers/video/fbdev/vt8623fb.c4
-rw-r--r--drivers/video/fbdev/xilinxfb.c62
-rw-r--r--drivers/video/of_display_timing.c41
-rw-r--r--drivers/video/of_videomode.c2
-rw-r--r--include/linux/fb.h10
-rw-r--r--include/linux/fbcon.h12
94 files changed, 398 insertions, 269 deletions
diff --git a/Documentation/fb/fbcon.txt b/Documentation/fb/fbcon.txt
index 4a9739abc860..a38d3aa4d189 100644
--- a/Documentation/fb/fbcon.txt
+++ b/Documentation/fb/fbcon.txt
@@ -148,6 +148,13 @@ C. Boot options
148 Actually, the underlying fb driver is totally ignorant of console 148 Actually, the underlying fb driver is totally ignorant of console
149 rotation. 149 rotation.
150 150
1515. fbcon=margin:<color>
152
153 This option specifies the color of the margins. The margins are the
154 leftover area at the right and the bottom of the screen that are not
155 used by text. By default, this area will be black. The 'color' value
156 is an integer number that depends on the framebuffer driver being used.
157
151C. Attaching, Detaching and Unloading 158C. Attaching, Detaching and Unloading
152 159
153Before going on how to attach, detach and unload the framebuffer console, an 160Before going on how to attach, detach and unload the framebuffer console, an
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 2111d06f8c81..7f1f1fbcef9e 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -117,7 +117,7 @@ config DUMMY_CONSOLE_ROWS
117 Select 25 if you use a 640x480 resolution by default. 117 Select 25 if you use a 640x480 resolution by default.
118 118
119config FRAMEBUFFER_CONSOLE 119config FRAMEBUFFER_CONSOLE
120 tristate "Framebuffer Console support" 120 bool "Framebuffer Console support"
121 depends on FB && !UML 121 depends on FB && !UML
122 select VT_HW_CONSOLE_BINDING 122 select VT_HW_CONSOLE_BINDING
123 select CRC32 123 select CRC32
diff --git a/drivers/video/console/Makefile b/drivers/video/console/Makefile
index 43bfa485db96..eb2cbec52643 100644
--- a/drivers/video/console/Makefile
+++ b/drivers/video/console/Makefile
@@ -7,13 +7,5 @@ obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o
7obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o 7obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o
8obj-$(CONFIG_VGA_CONSOLE) += vgacon.o 8obj-$(CONFIG_VGA_CONSOLE) += vgacon.o
9obj-$(CONFIG_MDA_CONSOLE) += mdacon.o 9obj-$(CONFIG_MDA_CONSOLE) += mdacon.o
10obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o bitblit.o softcursor.o
11ifeq ($(CONFIG_FB_TILEBLITTING),y)
12obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += tileblit.o
13endif
14ifeq ($(CONFIG_FRAMEBUFFER_CONSOLE_ROTATION),y)
15obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon_rotate.o fbcon_cw.o fbcon_ud.o \
16 fbcon_ccw.o
17endif
18 10
19obj-$(CONFIG_FB_STI) += sticore.o 11obj-$(CONFIG_FB_STI) += sticore.o
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index dc06cb6a15dc..445b1dc5d441 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -398,9 +398,8 @@ static const char *vgacon_startup(void)
398#endif 398#endif
399 } 399 }
400 400
401 /* boot_params.screen_info initialized? */ 401 /* boot_params.screen_info reasonably initialized? */
402 if ((screen_info.orig_video_mode == 0) && 402 if ((screen_info.orig_video_lines == 0) ||
403 (screen_info.orig_video_lines == 0) &&
404 (screen_info.orig_video_cols == 0)) 403 (screen_info.orig_video_cols == 0))
405 goto no_vga; 404 goto no_vga;
406 405
diff --git a/drivers/video/fbdev/68328fb.c b/drivers/video/fbdev/68328fb.c
index c0c6b88d3839..d48e96088f76 100644
--- a/drivers/video/fbdev/68328fb.c
+++ b/drivers/video/fbdev/68328fb.c
@@ -72,7 +72,7 @@ static struct fb_var_screeninfo mc68x328fb_default __initdata = {
72 .vmode = FB_VMODE_NONINTERLACED, 72 .vmode = FB_VMODE_NONINTERLACED,
73}; 73};
74 74
75static struct fb_fix_screeninfo mc68x328fb_fix __initdata = { 75static const struct fb_fix_screeninfo mc68x328fb_fix __initconst = {
76 .id = "68328fb", 76 .id = "68328fb",
77 .type = FB_TYPE_PACKED_PIXELS, 77 .type = FB_TYPE_PACKED_PIXELS,
78 .xpanstep = 1, 78 .xpanstep = 1,
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 5c6696bb56da..5e58f5ec0a28 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -2173,7 +2173,7 @@ config FB_PS3_DEFAULT_SIZE_M
2173 2173
2174config FB_XILINX 2174config FB_XILINX
2175 tristate "Xilinx frame buffer support" 2175 tristate "Xilinx frame buffer support"
2176 depends on FB && (XILINX_VIRTEX || MICROBLAZE || ARCH_ZYNQ) 2176 depends on FB && (XILINX_VIRTEX || MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP)
2177 select FB_CFB_FILLRECT 2177 select FB_CFB_FILLRECT
2178 select FB_CFB_COPYAREA 2178 select FB_CFB_COPYAREA
2179 select FB_CFB_IMAGEBLIT 2179 select FB_CFB_IMAGEBLIT
diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
index ffc2c33c6cef..36d25190b48c 100644
--- a/drivers/video/fbdev/amba-clcd.c
+++ b/drivers/video/fbdev/amba-clcd.c
@@ -1035,7 +1035,7 @@ static struct clcd_vendor_data vendor_nomadik = {
1035 .init_panel = nomadik_clcd_init_panel, 1035 .init_panel = nomadik_clcd_init_panel,
1036}; 1036};
1037 1037
1038static struct amba_id clcdfb_id_table[] = { 1038static const struct amba_id clcdfb_id_table[] = {
1039 { 1039 {
1040 .id = 0x00041110, 1040 .id = 0x00041110,
1041 .mask = 0x000ffffe, 1041 .mask = 0x000ffffe,
diff --git a/drivers/video/fbdev/arkfb.c b/drivers/video/fbdev/arkfb.c
index 6a317de7082c..13ba371e70aa 100644
--- a/drivers/video/fbdev/arkfb.c
+++ b/drivers/video/fbdev/arkfb.c
@@ -1157,7 +1157,7 @@ fail:
1157 1157
1158/* List of boards that we are trying to support */ 1158/* List of boards that we are trying to support */
1159 1159
1160static struct pci_device_id ark_devices[] = { 1160static const struct pci_device_id ark_devices[] = {
1161 {PCI_DEVICE(0xEDD8, 0xA099)}, 1161 {PCI_DEVICE(0xEDD8, 0xA099)},
1162 {0, 0, 0, 0, 0, 0, 0} 1162 {0, 0, 0, 0, 0, 0, 0}
1163}; 1163};
diff --git a/drivers/video/fbdev/asiliantfb.c b/drivers/video/fbdev/asiliantfb.c
index 91eea4583382..ea31054a28ca 100644
--- a/drivers/video/fbdev/asiliantfb.c
+++ b/drivers/video/fbdev/asiliantfb.c
@@ -592,7 +592,7 @@ static void asiliantfb_remove(struct pci_dev *dp)
592 framebuffer_release(p); 592 framebuffer_release(p);
593} 593}
594 594
595static struct pci_device_id asiliantfb_pci_tbl[] = { 595static const struct pci_device_id asiliantfb_pci_tbl[] = {
596 { PCI_VENDOR_ID_CT, PCI_DEVICE_ID_CT_69000, PCI_ANY_ID, PCI_ANY_ID }, 596 { PCI_VENDOR_ID_CT, PCI_DEVICE_ID_CT_69000, PCI_ANY_ID, PCI_ANY_ID },
597 { 0 } 597 { 0 }
598}; 598};
diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
index 669ecc755fa9..e06358da4b99 100644
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -320,7 +320,7 @@ static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int
320 } 320 }
321} 321}
322 322
323static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = { 323static const struct fb_fix_screeninfo atmel_lcdfb_fix __initconst = {
324 .type = FB_TYPE_PACKED_PIXELS, 324 .type = FB_TYPE_PACKED_PIXELS,
325 .visual = FB_VISUAL_TRUECOLOR, 325 .visual = FB_VISUAL_TRUECOLOR,
326 .xpanstep = 0, 326 .xpanstep = 0,
diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c
index fa07242a78d2..db18474607c9 100644
--- a/drivers/video/fbdev/aty/aty128fb.c
+++ b/drivers/video/fbdev/aty/aty128fb.c
@@ -116,7 +116,7 @@ static const struct fb_var_screeninfo default_var = {
116 116
117/* default modedb mode */ 117/* default modedb mode */
118/* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */ 118/* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */
119static struct fb_videomode defaultmode = { 119static const struct fb_videomode defaultmode = {
120 .refresh = 60, 120 .refresh = 60,
121 .xres = 640, 121 .xres = 640,
122 .yres = 480, 122 .yres = 480,
@@ -166,7 +166,7 @@ static int aty128_pci_resume(struct pci_dev *pdev);
166static int aty128_do_resume(struct pci_dev *pdev); 166static int aty128_do_resume(struct pci_dev *pdev);
167 167
168/* supported Rage128 chipsets */ 168/* supported Rage128 chipsets */
169static struct pci_device_id aty128_pci_tbl[] = { 169static const struct pci_device_id aty128_pci_tbl[] = {
170 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LE, 170 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LE,
171 PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_M3_pci }, 171 PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_M3_pci },
172 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LF, 172 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LF,
diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c
index b55fdac9c9f5..3ec72f19114b 100644
--- a/drivers/video/fbdev/aty/atyfb_base.c
+++ b/drivers/video/fbdev/aty/atyfb_base.c
@@ -274,7 +274,7 @@ static struct fb_var_screeninfo default_var = {
274 0, FB_VMODE_NONINTERLACED 274 0, FB_VMODE_NONINTERLACED
275}; 275};
276 276
277static struct fb_videomode defmode = { 277static const struct fb_videomode defmode = {
278 /* 640x480 @ 60 Hz, 31.5 kHz hsync */ 278 /* 640x480 @ 60 Hz, 31.5 kHz hsync */
279 NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2, 279 NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
280 0, FB_VMODE_NONINTERLACED 280 0, FB_VMODE_NONINTERLACED
@@ -1855,7 +1855,7 @@ static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
1855#if defined(DEBUG) && defined(CONFIG_FB_ATY_CT) 1855#if defined(DEBUG) && defined(CONFIG_FB_ATY_CT)
1856 case ATYIO_CLKR: 1856 case ATYIO_CLKR:
1857 if (M64_HAS(INTEGRATED)) { 1857 if (M64_HAS(INTEGRATED)) {
1858 struct atyclk clk; 1858 struct atyclk clk = { 0 };
1859 union aty_pll *pll = &par->pll; 1859 union aty_pll *pll = &par->pll;
1860 u32 dsp_config = pll->ct.dsp_config; 1860 u32 dsp_config = pll->ct.dsp_config;
1861 u32 dsp_on_off = pll->ct.dsp_on_off; 1861 u32 dsp_on_off = pll->ct.dsp_on_off;
@@ -3756,7 +3756,7 @@ static void atyfb_pci_remove(struct pci_dev *pdev)
3756 atyfb_remove(info); 3756 atyfb_remove(info);
3757} 3757}
3758 3758
3759static struct pci_device_id atyfb_pci_tbl[] = { 3759static const struct pci_device_id atyfb_pci_tbl[] = {
3760#ifdef CONFIG_FB_ATY_GX 3760#ifdef CONFIG_FB_ATY_GX
3761 { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_CHIP_MACH64GX) }, 3761 { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_CHIP_MACH64GX) },
3762 { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_CHIP_MACH64CX) }, 3762 { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_CHIP_MACH64CX) },
diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c
index 6b4c7872b375..1e2ec360f8c1 100644
--- a/drivers/video/fbdev/aty/radeon_base.c
+++ b/drivers/video/fbdev/aty/radeon_base.c
@@ -96,7 +96,7 @@
96#define CHIP_DEF(id, family, flags) \ 96#define CHIP_DEF(id, family, flags) \
97 { PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) } 97 { PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) }
98 98
99static struct pci_device_id radeonfb_pci_table[] = { 99static const struct pci_device_id radeonfb_pci_table[] = {
100 /* Radeon Xpress 200m */ 100 /* Radeon Xpress 200m */
101 CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY), 101 CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
102 CHIP_DEF(PCI_CHIP_RS482_5975, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY), 102 CHIP_DEF(PCI_CHIP_RS482_5975, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
@@ -2241,7 +2241,7 @@ static ssize_t radeon_show_edid2(struct file *filp, struct kobject *kobj,
2241 return radeon_show_one_edid(buf, off, count, rinfo->mon2_EDID); 2241 return radeon_show_one_edid(buf, off, count, rinfo->mon2_EDID);
2242} 2242}
2243 2243
2244static struct bin_attribute edid1_attr = { 2244static const struct bin_attribute edid1_attr = {
2245 .attr = { 2245 .attr = {
2246 .name = "edid1", 2246 .name = "edid1",
2247 .mode = 0444, 2247 .mode = 0444,
@@ -2250,7 +2250,7 @@ static struct bin_attribute edid1_attr = {
2250 .read = radeon_show_edid1, 2250 .read = radeon_show_edid1,
2251}; 2251};
2252 2252
2253static struct bin_attribute edid2_attr = { 2253static const struct bin_attribute edid2_attr = {
2254 .attr = { 2254 .attr = {
2255 .name = "edid2", 2255 .name = "edid2",
2256 .mode = 0444, 2256 .mode = 0444,
diff --git a/drivers/video/fbdev/bfin-lq035q1-fb.c b/drivers/video/fbdev/bfin-lq035q1-fb.c
index b594a58ff21d..b459354ad940 100644
--- a/drivers/video/fbdev/bfin-lq035q1-fb.c
+++ b/drivers/video/fbdev/bfin-lq035q1-fb.c
@@ -841,7 +841,7 @@ static int bfin_lq035q1_resume(struct device *dev)
841 return 0; 841 return 0;
842} 842}
843 843
844static struct dev_pm_ops bfin_lq035q1_dev_pm_ops = { 844static const struct dev_pm_ops bfin_lq035q1_dev_pm_ops = {
845 .suspend = bfin_lq035q1_suspend, 845 .suspend = bfin_lq035q1_suspend,
846 .resume = bfin_lq035q1_resume, 846 .resume = bfin_lq035q1_resume,
847}; 847};
diff --git a/drivers/video/fbdev/bw2.c b/drivers/video/fbdev/bw2.c
index 8c5b281f0b29..7aa972072357 100644
--- a/drivers/video/fbdev/bw2.c
+++ b/drivers/video/fbdev/bw2.c
@@ -333,8 +333,8 @@ static int bw2_probe(struct platform_device *op)
333 333
334 dev_set_drvdata(&op->dev, info); 334 dev_set_drvdata(&op->dev, info);
335 335
336 printk(KERN_INFO "%s: bwtwo at %lx:%lx\n", 336 printk(KERN_INFO "%pOF: bwtwo at %lx:%lx\n",
337 dp->full_name, par->which_io, info->fix.smem_start); 337 dp, par->which_io, info->fix.smem_start);
338 338
339 return 0; 339 return 0;
340 340
diff --git a/drivers/video/fbdev/cg14.c b/drivers/video/fbdev/cg14.c
index 43e915eaf606..8de88b129b62 100644
--- a/drivers/video/fbdev/cg14.c
+++ b/drivers/video/fbdev/cg14.c
@@ -553,8 +553,8 @@ static int cg14_probe(struct platform_device *op)
553 553
554 dev_set_drvdata(&op->dev, info); 554 dev_set_drvdata(&op->dev, info);
555 555
556 printk(KERN_INFO "%s: cgfourteen at %lx:%lx, %dMB\n", 556 printk(KERN_INFO "%pOF: cgfourteen at %lx:%lx, %dMB\n",
557 dp->full_name, 557 dp,
558 par->iospace, info->fix.smem_start, 558 par->iospace, info->fix.smem_start,
559 par->ramsize >> 20); 559 par->ramsize >> 20);
560 560
diff --git a/drivers/video/fbdev/cg3.c b/drivers/video/fbdev/cg3.c
index 716391f22e75..6c334260cf53 100644
--- a/drivers/video/fbdev/cg3.c
+++ b/drivers/video/fbdev/cg3.c
@@ -412,8 +412,8 @@ static int cg3_probe(struct platform_device *op)
412 412
413 dev_set_drvdata(&op->dev, info); 413 dev_set_drvdata(&op->dev, info);
414 414
415 printk(KERN_INFO "%s: cg3 at %lx:%lx\n", 415 printk(KERN_INFO "%pOF: cg3 at %lx:%lx\n",
416 dp->full_name, par->which_io, info->fix.smem_start); 416 dp, par->which_io, info->fix.smem_start);
417 417
418 return 0; 418 return 0;
419 419
diff --git a/drivers/video/fbdev/cg6.c b/drivers/video/fbdev/cg6.c
index bdf901ed5291..0296c21acc78 100644
--- a/drivers/video/fbdev/cg6.c
+++ b/drivers/video/fbdev/cg6.c
@@ -810,8 +810,8 @@ static int cg6_probe(struct platform_device *op)
810 810
811 dev_set_drvdata(&op->dev, info); 811 dev_set_drvdata(&op->dev, info);
812 812
813 printk(KERN_INFO "%s: CGsix [%s] at %lx:%lx\n", 813 printk(KERN_INFO "%pOF: CGsix [%s] at %lx:%lx\n",
814 dp->full_name, info->fix.id, 814 dp, info->fix.id,
815 par->which_io, info->fix.smem_start); 815 par->which_io, info->fix.smem_start);
816 816
817 return 0; 817 return 0;
diff --git a/drivers/video/fbdev/chipsfb.c b/drivers/video/fbdev/chipsfb.c
index 59abdc6a97f6..f103665cad43 100644
--- a/drivers/video/fbdev/chipsfb.c
+++ b/drivers/video/fbdev/chipsfb.c
@@ -292,7 +292,7 @@ static void chips_hw_init(void)
292 write_fr(chips_init_fr[i].addr, chips_init_fr[i].data); 292 write_fr(chips_init_fr[i].addr, chips_init_fr[i].data);
293} 293}
294 294
295static struct fb_fix_screeninfo chipsfb_fix = { 295static const struct fb_fix_screeninfo chipsfb_fix = {
296 .id = "C&T 65550", 296 .id = "C&T 65550",
297 .type = FB_TYPE_PACKED_PIXELS, 297 .type = FB_TYPE_PACKED_PIXELS,
298 .visual = FB_VISUAL_PSEUDOCOLOR, 298 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -309,7 +309,7 @@ static struct fb_fix_screeninfo chipsfb_fix = {
309 .smem_len = 0x100000, /* 1MB */ 309 .smem_len = 0x100000, /* 1MB */
310}; 310};
311 311
312static struct fb_var_screeninfo chipsfb_var = { 312static const struct fb_var_screeninfo chipsfb_var = {
313 .xres = 800, 313 .xres = 800,
314 .yres = 600, 314 .yres = 600,
315 .xres_virtual = 800, 315 .xres_virtual = 800,
diff --git a/drivers/video/fbdev/cobalt_lcdfb.c b/drivers/video/fbdev/cobalt_lcdfb.c
index 9da90bd242f4..0ef633e278a1 100644
--- a/drivers/video/fbdev/cobalt_lcdfb.c
+++ b/drivers/video/fbdev/cobalt_lcdfb.c
@@ -126,7 +126,7 @@ static void lcd_clear(struct fb_info *info)
126 lcd_write_control(info, LCD_RESET); 126 lcd_write_control(info, LCD_RESET);
127} 127}
128 128
129static struct fb_fix_screeninfo cobalt_lcdfb_fix = { 129static const struct fb_fix_screeninfo cobalt_lcdfb_fix = {
130 .id = "cobalt-lcd", 130 .id = "cobalt-lcd",
131 .type = FB_TYPE_TEXT, 131 .type = FB_TYPE_TEXT,
132 .type_aux = FB_AUX_TEXT_MDA, 132 .type_aux = FB_AUX_TEXT_MDA,
diff --git a/drivers/video/fbdev/core/Makefile b/drivers/video/fbdev/core/Makefile
index 9e3ddf225393..73493bbd7a15 100644
--- a/drivers/video/fbdev/core/Makefile
+++ b/drivers/video/fbdev/core/Makefile
@@ -4,6 +4,20 @@ obj-$(CONFIG_FB) += fb.o
4fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \ 4fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \
5 modedb.o fbcvt.o 5 modedb.o fbcvt.o
6fb-$(CONFIG_FB_DEFERRED_IO) += fb_defio.o 6fb-$(CONFIG_FB_DEFERRED_IO) += fb_defio.o
7
8ifeq ($(CONFIG_FRAMEBUFFER_CONSOLE),y)
9fb-y += fbcon.o bitblit.o softcursor.o
10ifeq ($(CONFIG_FB_TILEBLITTING),y)
11fb-y += tileblit.o
12endif
13ifeq ($(CONFIG_FRAMEBUFFER_CONSOLE_ROTATION),y)
14fb-y += fbcon_rotate.o fbcon_cw.o fbcon_ud.o \
15 fbcon_ccw.o
16endif
17ifeq ($(CONFIG_DMI),y)
18fb-y += fbcon_dmi_quirks.o
19endif
20endif
7fb-objs := $(fb-y) 21fb-objs := $(fb-y)
8 22
9obj-$(CONFIG_FB_CFB_FILLRECT) += cfbfillrect.o 23obj-$(CONFIG_FB_CFB_FILLRECT) += cfbfillrect.o
diff --git a/drivers/video/console/bitblit.c b/drivers/video/fbdev/core/bitblit.c
index dbfe4eecf12e..790900d646c0 100644
--- a/drivers/video/console/bitblit.c
+++ b/drivers/video/fbdev/core/bitblit.c
@@ -203,7 +203,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
203} 203}
204 204
205static void bit_clear_margins(struct vc_data *vc, struct fb_info *info, 205static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
206 int bottom_only) 206 int color, int bottom_only)
207{ 207{
208 unsigned int cw = vc->vc_font.width; 208 unsigned int cw = vc->vc_font.width;
209 unsigned int ch = vc->vc_font.height; 209 unsigned int ch = vc->vc_font.height;
@@ -213,7 +213,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
213 unsigned int bs = info->var.yres - bh; 213 unsigned int bs = info->var.yres - bh;
214 struct fb_fillrect region; 214 struct fb_fillrect region;
215 215
216 region.color = 0; 216 region.color = color;
217 region.rop = ROP_COPY; 217 region.rop = ROP_COPY;
218 218
219 if (rw && !bottom_only) { 219 if (rw && !bottom_only) {
@@ -416,7 +416,3 @@ void fbcon_set_bitops(struct fbcon_ops *ops)
416 416
417EXPORT_SYMBOL(fbcon_set_bitops); 417EXPORT_SYMBOL(fbcon_set_bitops);
418 418
419MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
420MODULE_DESCRIPTION("Bit Blitting Operation");
421MODULE_LICENSE("GPL");
422
diff --git a/drivers/video/console/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 12ded23f1aaf..04612f938bab 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -68,6 +68,7 @@
68#include <linux/kd.h> 68#include <linux/kd.h>
69#include <linux/slab.h> 69#include <linux/slab.h>
70#include <linux/fb.h> 70#include <linux/fb.h>
71#include <linux/fbcon.h>
71#include <linux/vt_kern.h> 72#include <linux/vt_kern.h>
72#include <linux/selection.h> 73#include <linux/selection.h>
73#include <linux/font.h> 74#include <linux/font.h>
@@ -135,8 +136,9 @@ static char fontname[40];
135static int info_idx = -1; 136static int info_idx = -1;
136 137
137/* console rotation */ 138/* console rotation */
138static int initial_rotation; 139static int initial_rotation = -1;
139static int fbcon_has_sysfs; 140static int fbcon_has_sysfs;
141static int margin_color;
140 142
141static const struct consw fb_con; 143static const struct consw fb_con;
142 144
@@ -491,6 +493,13 @@ static int __init fb_console_setup(char *this_opt)
491 initial_rotation = 0; 493 initial_rotation = 0;
492 continue; 494 continue;
493 } 495 }
496
497 if (!strncmp(options, "margin:", 7)) {
498 options += 7;
499 if (*options)
500 margin_color = simple_strtoul(options, &options, 0);
501 continue;
502 }
494 } 503 }
495 return 1; 504 return 1;
496} 505}
@@ -563,7 +572,7 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info,
563 unsigned short *save = NULL, *r, *q; 572 unsigned short *save = NULL, *r, *q;
564 int logo_height; 573 int logo_height;
565 574
566 if (info->flags & FBINFO_MODULE) { 575 if (info->fbops->owner) {
567 logo_shown = FBCON_LOGO_DONTSHOW; 576 logo_shown = FBCON_LOGO_DONTSHOW;
568 return; 577 return;
569 } 578 }
@@ -954,7 +963,10 @@ static const char *fbcon_startup(void)
954 ops->cur_rotate = -1; 963 ops->cur_rotate = -1;
955 ops->cur_blink_jiffies = HZ / 5; 964 ops->cur_blink_jiffies = HZ / 5;
956 info->fbcon_par = ops; 965 info->fbcon_par = ops;
957 p->con_rotate = initial_rotation; 966 if (initial_rotation != -1)
967 p->con_rotate = initial_rotation;
968 else
969 p->con_rotate = fbcon_platform_get_rotate(info);
958 set_blitting_type(vc, info); 970 set_blitting_type(vc, info);
959 971
960 if (info->fix.type != FB_TYPE_TEXT) { 972 if (info->fix.type != FB_TYPE_TEXT) {
@@ -1091,7 +1103,10 @@ static void fbcon_init(struct vc_data *vc, int init)
1091 1103
1092 ops = info->fbcon_par; 1104 ops = info->fbcon_par;
1093 ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); 1105 ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
1094 p->con_rotate = initial_rotation; 1106 if (initial_rotation != -1)
1107 p->con_rotate = initial_rotation;
1108 else
1109 p->con_rotate = fbcon_platform_get_rotate(info);
1095 set_blitting_type(vc, info); 1110 set_blitting_type(vc, info);
1096 1111
1097 cols = vc->vc_cols; 1112 cols = vc->vc_cols;
@@ -1299,7 +1314,7 @@ static void fbcon_clear_margins(struct vc_data *vc, int bottom_only)
1299 struct fbcon_ops *ops = info->fbcon_par; 1314 struct fbcon_ops *ops = info->fbcon_par;
1300 1315
1301 if (!fbcon_is_inactive(vc, info)) 1316 if (!fbcon_is_inactive(vc, info))
1302 ops->clear_margins(vc, info, bottom_only); 1317 ops->clear_margins(vc, info, margin_color, bottom_only);
1303} 1318}
1304 1319
1305static void fbcon_cursor(struct vc_data *vc, int mode) 1320static void fbcon_cursor(struct vc_data *vc, int mode)
@@ -3606,7 +3621,7 @@ static void fbcon_exit(void)
3606 fbcon_has_exited = 1; 3621 fbcon_has_exited = 1;
3607} 3622}
3608 3623
3609static int __init fb_console_init(void) 3624void __init fb_console_init(void)
3610{ 3625{
3611 int i; 3626 int i;
3612 3627
@@ -3628,11 +3643,8 @@ static int __init fb_console_init(void)
3628 3643
3629 console_unlock(); 3644 console_unlock();
3630 fbcon_start(); 3645 fbcon_start();
3631 return 0;
3632} 3646}
3633 3647
3634fs_initcall(fb_console_init);
3635
3636#ifdef MODULE 3648#ifdef MODULE
3637 3649
3638static void __exit fbcon_deinit_device(void) 3650static void __exit fbcon_deinit_device(void)
@@ -3647,7 +3659,7 @@ static void __exit fbcon_deinit_device(void)
3647 } 3659 }
3648} 3660}
3649 3661
3650static void __exit fb_console_exit(void) 3662void __exit fb_console_exit(void)
3651{ 3663{
3652 console_lock(); 3664 console_lock();
3653 fb_unregister_client(&fbcon_event_notifier); 3665 fb_unregister_client(&fbcon_event_notifier);
@@ -3657,9 +3669,4 @@ static void __exit fb_console_exit(void)
3657 do_unregister_con_driver(&fb_con); 3669 do_unregister_con_driver(&fb_con);
3658 console_unlock(); 3670 console_unlock();
3659} 3671}
3660
3661module_exit(fb_console_exit);
3662
3663#endif 3672#endif
3664
3665MODULE_LICENSE("GPL");
diff --git a/drivers/video/console/fbcon.h b/drivers/video/fbdev/core/fbcon.h
index 7aaa4eabbba0..18f3ac144237 100644
--- a/drivers/video/console/fbcon.h
+++ b/drivers/video/fbdev/core/fbcon.h
@@ -60,7 +60,7 @@ struct fbcon_ops {
60 const unsigned short *s, int count, int yy, int xx, 60 const unsigned short *s, int count, int yy, int xx,
61 int fg, int bg); 61 int fg, int bg);
62 void (*clear_margins)(struct vc_data *vc, struct fb_info *info, 62 void (*clear_margins)(struct vc_data *vc, struct fb_info *info,
63 int bottom_only); 63 int color, int bottom_only);
64 void (*cursor)(struct vc_data *vc, struct fb_info *info, int mode, 64 void (*cursor)(struct vc_data *vc, struct fb_info *info, int mode,
65 int softback_lines, int fg, int bg); 65 int softback_lines, int fg, int bg);
66 int (*update_start)(struct fb_info *info); 66 int (*update_start)(struct fb_info *info);
@@ -261,5 +261,10 @@ extern void fbcon_set_rotate(struct fbcon_ops *ops);
261#define fbcon_set_rotate(x) do {} while(0) 261#define fbcon_set_rotate(x) do {} while(0)
262#endif /* CONFIG_FRAMEBUFFER_CONSOLE_ROTATION */ 262#endif /* CONFIG_FRAMEBUFFER_CONSOLE_ROTATION */
263 263
264#endif /* _VIDEO_FBCON_H */ 264#ifdef CONFIG_DMI
265int fbcon_platform_get_rotate(struct fb_info *info);
266#else
267#define fbcon_platform_get_rotate(i) FB_ROTATE_UR
268#endif /* CONFIG_DMI */
265 269
270#endif /* _VIDEO_FBCON_H */
diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/fbdev/core/fbcon_ccw.c
index 5a3cbf6dff4d..37a8b0b22566 100644
--- a/drivers/video/console/fbcon_ccw.c
+++ b/drivers/video/fbdev/core/fbcon_ccw.c
@@ -189,7 +189,7 @@ static void ccw_putcs(struct vc_data *vc, struct fb_info *info,
189} 189}
190 190
191static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info, 191static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info,
192 int bottom_only) 192 int color, int bottom_only)
193{ 193{
194 unsigned int cw = vc->vc_font.width; 194 unsigned int cw = vc->vc_font.width;
195 unsigned int ch = vc->vc_font.height; 195 unsigned int ch = vc->vc_font.height;
@@ -198,7 +198,7 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info,
198 unsigned int bs = vc->vc_rows*ch; 198 unsigned int bs = vc->vc_rows*ch;
199 struct fb_fillrect region; 199 struct fb_fillrect region;
200 200
201 region.color = 0; 201 region.color = color;
202 region.rop = ROP_COPY; 202 region.rop = ROP_COPY;
203 203
204 if (rw && !bottom_only) { 204 if (rw && !bottom_only) {
@@ -418,7 +418,3 @@ void fbcon_rotate_ccw(struct fbcon_ops *ops)
418 ops->update_start = ccw_update_start; 418 ops->update_start = ccw_update_start;
419} 419}
420EXPORT_SYMBOL(fbcon_rotate_ccw); 420EXPORT_SYMBOL(fbcon_rotate_ccw);
421
422MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
423MODULE_DESCRIPTION("Console Rotation (270 degrees) Support");
424MODULE_LICENSE("GPL");
diff --git a/drivers/video/console/fbcon_cw.c b/drivers/video/fbdev/core/fbcon_cw.c
index e7ee44db4e98..1888f8c866e8 100644
--- a/drivers/video/console/fbcon_cw.c
+++ b/drivers/video/fbdev/core/fbcon_cw.c
@@ -172,7 +172,7 @@ static void cw_putcs(struct vc_data *vc, struct fb_info *info,
172} 172}
173 173
174static void cw_clear_margins(struct vc_data *vc, struct fb_info *info, 174static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
175 int bottom_only) 175 int color, int bottom_only)
176{ 176{
177 unsigned int cw = vc->vc_font.width; 177 unsigned int cw = vc->vc_font.width;
178 unsigned int ch = vc->vc_font.height; 178 unsigned int ch = vc->vc_font.height;
@@ -181,7 +181,7 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
181 unsigned int rs = info->var.yres - rw; 181 unsigned int rs = info->var.yres - rw;
182 struct fb_fillrect region; 182 struct fb_fillrect region;
183 183
184 region.color = 0; 184 region.color = color;
185 region.rop = ROP_COPY; 185 region.rop = ROP_COPY;
186 186
187 if (rw && !bottom_only) { 187 if (rw && !bottom_only) {
@@ -401,7 +401,3 @@ void fbcon_rotate_cw(struct fbcon_ops *ops)
401 ops->update_start = cw_update_start; 401 ops->update_start = cw_update_start;
402} 402}
403EXPORT_SYMBOL(fbcon_rotate_cw); 403EXPORT_SYMBOL(fbcon_rotate_cw);
404
405MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
406MODULE_DESCRIPTION("Console Rotation (90 degrees) Support");
407MODULE_LICENSE("GPL");
diff --git a/drivers/video/fbdev/core/fbcon_dmi_quirks.c b/drivers/video/fbdev/core/fbcon_dmi_quirks.c
new file mode 100644
index 000000000000..6904e47d1e51
--- /dev/null
+++ b/drivers/video/fbdev/core/fbcon_dmi_quirks.c
@@ -0,0 +1,145 @@
1/*
2 * fbcon_dmi_quirks.c -- DMI based quirk detection for fbcon
3 *
4 * Copyright (C) 2017 Hans de Goede <hdegoede@redhat.com>
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive for
8 * more details.
9 */
10
11#include <linux/dmi.h>
12#include <linux/fb.h>
13#include <linux/kernel.h>
14#include "fbcon.h"
15
16/*
17 * Some x86 clamshell design devices use portrait tablet screens and a display
18 * engine which cannot rotate in hardware, so we need to rotate the fbcon to
19 * compensate. Unfortunately these (cheap) devices also typically have quite
20 * generic DMI data, so we match on a combination of DMI data, screen resolution
21 * and a list of known BIOS dates to avoid false positives.
22 */
23
24struct fbcon_dmi_rotate_data {
25 int width;
26 int height;
27 const char * const *bios_dates;
28 int rotate;
29};
30
31static const struct fbcon_dmi_rotate_data rotate_data_asus_t100ha = {
32 .width = 800,
33 .height = 1280,
34 .rotate = FB_ROTATE_CCW,
35};
36
37static const struct fbcon_dmi_rotate_data rotate_data_gpd_pocket = {
38 .width = 1200,
39 .height = 1920,
40 .bios_dates = (const char * const []){ "05/26/2017", "06/28/2017",
41 "07/05/2017", "08/07/2017", NULL },
42 .rotate = FB_ROTATE_CW,
43};
44
45static const struct fbcon_dmi_rotate_data rotate_data_gpd_win = {
46 .width = 720,
47 .height = 1280,
48 .bios_dates = (const char * const []){
49 "10/25/2016", "11/18/2016", "12/23/2016", "12/26/2016",
50 "02/21/2017", "03/20/2017", "05/25/2017", NULL },
51 .rotate = FB_ROTATE_CW,
52};
53
54static const struct fbcon_dmi_rotate_data rotate_data_itworks_tw891 = {
55 .width = 800,
56 .height = 1280,
57 .bios_dates = (const char * const []){ "10/16/2015", NULL },
58 .rotate = FB_ROTATE_CW,
59};
60
61static const struct fbcon_dmi_rotate_data rotate_data_vios_lth17 = {
62 .width = 800,
63 .height = 1280,
64 .rotate = FB_ROTATE_CW,
65};
66
67static const struct dmi_system_id rotate_data[] = {
68 { /* Asus T100HA */
69 .matches = {
70 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
71 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100HAN"),
72 },
73 .driver_data = (void *)&rotate_data_asus_t100ha,
74 }, { /*
75 * GPD Pocket, note that the the DMI data is less generic then
76 * it seems, devices with a board-vendor of "AMI Corporation"
77 * are quite rare, as are devices which have both board- *and*
78 * product-id set to "Default String"
79 */
80 .matches = {
81 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
82 DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
83 DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
84 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
85 },
86 .driver_data = (void *)&rotate_data_gpd_pocket,
87 }, { /* GPD Win (same note on DMI match as GPD Pocket) */
88 .matches = {
89 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
90 DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
91 DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
92 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
93 },
94 .driver_data = (void *)&rotate_data_gpd_win,
95 }, { /* I.T.Works TW891 */
96 .matches = {
97 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
98 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "TW891"),
99 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
100 DMI_EXACT_MATCH(DMI_BOARD_NAME, "TW891"),
101 },
102 .driver_data = (void *)&rotate_data_itworks_tw891,
103 }, { /* VIOS LTH17 */
104 .matches = {
105 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "VIOS"),
106 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "LTH17"),
107 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "VIOS"),
108 DMI_EXACT_MATCH(DMI_BOARD_NAME, "LTH17"),
109 },
110 .driver_data = (void *)&rotate_data_vios_lth17,
111 },
112 {}
113};
114
115int fbcon_platform_get_rotate(struct fb_info *info)
116{
117 const struct dmi_system_id *match;
118 const struct fbcon_dmi_rotate_data *data;
119 const char *bios_date;
120 int i;
121
122 for (match = dmi_first_match(rotate_data);
123 match;
124 match = dmi_first_match(match + 1)) {
125 data = match->driver_data;
126
127 if (data->width != info->var.xres ||
128 data->height != info->var.yres)
129 continue;
130
131 if (!data->bios_dates)
132 return data->rotate;
133
134 bios_date = dmi_get_system_info(DMI_BIOS_DATE);
135 if (!bios_date)
136 continue;
137
138 for (i = 0; data->bios_dates[i]; i++) {
139 if (!strcmp(data->bios_dates[i], bios_date))
140 return data->rotate;
141 }
142 }
143
144 return FB_ROTATE_UR;
145}
diff --git a/drivers/video/console/fbcon_rotate.c b/drivers/video/fbdev/core/fbcon_rotate.c
index db6528f2d3f2..8a51e4d95cc5 100644
--- a/drivers/video/console/fbcon_rotate.c
+++ b/drivers/video/fbdev/core/fbcon_rotate.c
@@ -110,7 +110,3 @@ void fbcon_set_rotate(struct fbcon_ops *ops)
110 } 110 }
111} 111}
112EXPORT_SYMBOL(fbcon_set_rotate); 112EXPORT_SYMBOL(fbcon_set_rotate);
113
114MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
115MODULE_DESCRIPTION("Console Rotation Support");
116MODULE_LICENSE("GPL");
diff --git a/drivers/video/console/fbcon_rotate.h b/drivers/video/fbdev/core/fbcon_rotate.h
index e233444cda66..e233444cda66 100644
--- a/drivers/video/console/fbcon_rotate.h
+++ b/drivers/video/fbdev/core/fbcon_rotate.h
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/fbdev/core/fbcon_ud.c
index 19e3714abfe8..f98eee263597 100644
--- a/drivers/video/console/fbcon_ud.c
+++ b/drivers/video/fbdev/core/fbcon_ud.c
@@ -220,7 +220,7 @@ static void ud_putcs(struct vc_data *vc, struct fb_info *info,
220} 220}
221 221
222static void ud_clear_margins(struct vc_data *vc, struct fb_info *info, 222static void ud_clear_margins(struct vc_data *vc, struct fb_info *info,
223 int bottom_only) 223 int color, int bottom_only)
224{ 224{
225 unsigned int cw = vc->vc_font.width; 225 unsigned int cw = vc->vc_font.width;
226 unsigned int ch = vc->vc_font.height; 226 unsigned int ch = vc->vc_font.height;
@@ -228,7 +228,7 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info,
228 unsigned int bh = info->var.yres - (vc->vc_rows*ch); 228 unsigned int bh = info->var.yres - (vc->vc_rows*ch);
229 struct fb_fillrect region; 229 struct fb_fillrect region;
230 230
231 region.color = 0; 231 region.color = color;
232 region.rop = ROP_COPY; 232 region.rop = ROP_COPY;
233 233
234 if (rw && !bottom_only) { 234 if (rw && !bottom_only) {
@@ -446,7 +446,3 @@ void fbcon_rotate_ud(struct fbcon_ops *ops)
446 ops->update_start = ud_update_start; 446 ops->update_start = ud_update_start;
447} 447}
448EXPORT_SYMBOL(fbcon_rotate_ud); 448EXPORT_SYMBOL(fbcon_rotate_ud);
449
450MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
451MODULE_DESCRIPTION("Console Rotation (180 degrees) Support");
452MODULE_LICENSE("GPL");
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 25e862c487f6..f741ba8df01b 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -32,6 +32,7 @@
32#include <linux/device.h> 32#include <linux/device.h>
33#include <linux/efi.h> 33#include <linux/efi.h>
34#include <linux/fb.h> 34#include <linux/fb.h>
35#include <linux/fbcon.h>
35#include <linux/mem_encrypt.h> 36#include <linux/mem_encrypt.h>
36 37
37#include <asm/fb.h> 38#include <asm/fb.h>
@@ -316,7 +317,7 @@ static void fb_set_logo(struct fb_info *info,
316 for (i = 0; i < logo->height; i++) { 317 for (i = 0; i < logo->height; i++) {
317 for (j = 0; j < logo->width; src++) { 318 for (j = 0; j < logo->width; src++) {
318 d = *src ^ xor; 319 d = *src ^ xor;
319 for (k = 7; k >= 0; k--) { 320 for (k = 7; k >= 0 && j < logo->width; k--) {
320 *dst++ = ((d >> k) & 1) ? fg : 0; 321 *dst++ = ((d >> k) & 1) ? fg : 0;
321 j++; 322 j++;
322 } 323 }
@@ -463,7 +464,7 @@ static int fb_show_logo_line(struct fb_info *info, int rotate,
463 464
464 /* Return if the frame buffer is not mapped or suspended */ 465 /* Return if the frame buffer is not mapped or suspended */
465 if (logo == NULL || info->state != FBINFO_STATE_RUNNING || 466 if (logo == NULL || info->state != FBINFO_STATE_RUNNING ||
466 info->flags & FBINFO_MODULE) 467 info->fbops->owner)
467 return 0; 468 return 0;
468 469
469 image.depth = 8; 470 image.depth = 8;
@@ -601,7 +602,7 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
601 memset(&fb_logo, 0, sizeof(struct logo_data)); 602 memset(&fb_logo, 0, sizeof(struct logo_data));
602 603
603 if (info->flags & FBINFO_MISC_TILEBLITTING || 604 if (info->flags & FBINFO_MISC_TILEBLITTING ||
604 info->flags & FBINFO_MODULE) 605 info->fbops->owner)
605 return 0; 606 return 0;
606 607
607 if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) { 608 if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
@@ -1892,6 +1893,9 @@ fbmem_init(void)
1892 fb_class = NULL; 1893 fb_class = NULL;
1893 goto err_class; 1894 goto err_class;
1894 } 1895 }
1896
1897 fb_console_init();
1898
1895 return 0; 1899 return 0;
1896 1900
1897err_class: 1901err_class:
@@ -1906,6 +1910,8 @@ module_init(fbmem_init);
1906static void __exit 1910static void __exit
1907fbmem_exit(void) 1911fbmem_exit(void)
1908{ 1912{
1913 fb_console_exit();
1914
1909 remove_proc_entry("fb", NULL); 1915 remove_proc_entry("fb", NULL);
1910 class_destroy(fb_class); 1916 class_destroy(fb_class);
1911 unregister_chrdev(FB_MAJOR, "fb"); 1917 unregister_chrdev(FB_MAJOR, "fb");
diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
index 41d7979d81c5..2b2d67328514 100644
--- a/drivers/video/fbdev/core/fbmon.c
+++ b/drivers/video/fbdev/core/fbmon.c
@@ -1479,8 +1479,8 @@ int of_get_fb_videomode(struct device_node *np, struct fb_videomode *fb,
1479 if (ret) 1479 if (ret)
1480 return ret; 1480 return ret;
1481 1481
1482 pr_debug("%s: got %dx%d display mode from %s\n", 1482 pr_debug("%pOF: got %dx%d display mode from %s\n",
1483 of_node_full_name(np), vm.hactive, vm.vactive, np->name); 1483 np, vm.hactive, vm.vactive, np->name);
1484 dump_fb_videomode(fb); 1484 dump_fb_videomode(fb);
1485 1485
1486 return 0; 1486 return 0;
diff --git a/drivers/video/console/softcursor.c b/drivers/video/fbdev/core/softcursor.c
index 46dd8f5d2e9e..fc93f254498e 100644
--- a/drivers/video/console/softcursor.c
+++ b/drivers/video/fbdev/core/softcursor.c
@@ -76,7 +76,3 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor)
76} 76}
77 77
78EXPORT_SYMBOL(soft_cursor); 78EXPORT_SYMBOL(soft_cursor);
79
80MODULE_AUTHOR("James Simmons <jsimmons@users.sf.net>");
81MODULE_DESCRIPTION("Generic software cursor");
82MODULE_LICENSE("GPL");
diff --git a/drivers/video/console/tileblit.c b/drivers/video/fbdev/core/tileblit.c
index 15e8e1a89c45..93390312957f 100644
--- a/drivers/video/console/tileblit.c
+++ b/drivers/video/fbdev/core/tileblit.c
@@ -74,7 +74,7 @@ static void tile_putcs(struct vc_data *vc, struct fb_info *info,
74} 74}
75 75
76static void tile_clear_margins(struct vc_data *vc, struct fb_info *info, 76static void tile_clear_margins(struct vc_data *vc, struct fb_info *info,
77 int bottom_only) 77 int color, int bottom_only)
78{ 78{
79 return; 79 return;
80} 80}
@@ -152,8 +152,3 @@ void fbcon_set_tileops(struct vc_data *vc, struct fb_info *info)
152} 152}
153 153
154EXPORT_SYMBOL(fbcon_set_tileops); 154EXPORT_SYMBOL(fbcon_set_tileops);
155
156MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
157MODULE_DESCRIPTION("Tile Blitting Operation");
158MODULE_LICENSE("GPL");
159
diff --git a/drivers/video/fbdev/cyber2000fb.c b/drivers/video/fbdev/cyber2000fb.c
index 99acf538a8b8..9a5751cb4e16 100644
--- a/drivers/video/fbdev/cyber2000fb.c
+++ b/drivers/video/fbdev/cyber2000fb.c
@@ -1336,7 +1336,7 @@ static void cyber2000fb_i2c_unregister(struct cfb_info *cfb)
1336 * These parameters give 1336 * These parameters give
1337 * 640x480, hsync 31.5kHz, vsync 60Hz 1337 * 640x480, hsync 31.5kHz, vsync 60Hz
1338 */ 1338 */
1339static struct fb_videomode cyber2000fb_default_mode = { 1339static const struct fb_videomode cyber2000fb_default_mode = {
1340 .refresh = 60, 1340 .refresh = 60,
1341 .xres = 640, 1341 .xres = 640,
1342 .yres = 480, 1342 .yres = 480,
diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
index c229b1a0d13b..a74096c53cb5 100644
--- a/drivers/video/fbdev/da8xx-fb.c
+++ b/drivers/video/fbdev/da8xx-fb.c
@@ -1341,7 +1341,7 @@ static int fb_probe(struct platform_device *device)
1341{ 1341{
1342 struct da8xx_lcdc_platform_data *fb_pdata = 1342 struct da8xx_lcdc_platform_data *fb_pdata =
1343 dev_get_platdata(&device->dev); 1343 dev_get_platdata(&device->dev);
1344 static struct resource *lcdc_regs; 1344 struct resource *lcdc_regs;
1345 struct lcd_ctrl_config *lcd_cfg; 1345 struct lcd_ctrl_config *lcd_cfg;
1346 struct fb_videomode *lcdc_info; 1346 struct fb_videomode *lcdc_info;
1347 struct fb_info *da8xx_fb_info; 1347 struct fb_info *da8xx_fb_info;
diff --git a/drivers/video/fbdev/dnfb.c b/drivers/video/fbdev/dnfb.c
index 3526899da61b..7b1492d34e98 100644
--- a/drivers/video/fbdev/dnfb.c
+++ b/drivers/video/fbdev/dnfb.c
@@ -126,7 +126,7 @@ struct fb_var_screeninfo dnfb_var = {
126 .vmode = FB_VMODE_NONINTERLACED, 126 .vmode = FB_VMODE_NONINTERLACED,
127}; 127};
128 128
129static struct fb_fix_screeninfo dnfb_fix = { 129static const struct fb_fix_screeninfo dnfb_fix = {
130 .id = "Apollo Mono", 130 .id = "Apollo Mono",
131 .smem_start = (FRAME_BUFFER_START + IO_BASE), 131 .smem_start = (FRAME_BUFFER_START + IO_BASE),
132 .smem_len = FRAME_BUFFER_LEN, 132 .smem_len = FRAME_BUFFER_LEN,
diff --git a/drivers/video/fbdev/fb-puv3.c b/drivers/video/fbdev/fb-puv3.c
index 88fa2e70a0bb..d9e816d53531 100644
--- a/drivers/video/fbdev/fb-puv3.c
+++ b/drivers/video/fbdev/fb-puv3.c
@@ -69,7 +69,7 @@ static const struct fb_videomode unifb_modes[] = {
69 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, 69 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
70}; 70};
71 71
72static struct fb_var_screeninfo unifb_default = { 72static const struct fb_var_screeninfo unifb_default = {
73 .xres = 640, 73 .xres = 640,
74 .yres = 480, 74 .yres = 480,
75 .xres_virtual = 640, 75 .xres_virtual = 640,
diff --git a/drivers/video/fbdev/ffb.c b/drivers/video/fbdev/ffb.c
index dda31e0a45af..6b1915872af1 100644
--- a/drivers/video/fbdev/ffb.c
+++ b/drivers/video/fbdev/ffb.c
@@ -997,9 +997,9 @@ static int ffb_probe(struct platform_device *op)
997 997
998 dev_set_drvdata(&op->dev, info); 998 dev_set_drvdata(&op->dev, info);
999 999
1000 printk(KERN_INFO "%s: %s at %016lx, type %d, " 1000 printk(KERN_INFO "%pOF: %s at %016lx, type %d, "
1001 "DAC pnum[%x] rev[%d] manuf_rev[%d]\n", 1001 "DAC pnum[%x] rev[%d] manuf_rev[%d]\n",
1002 dp->full_name, 1002 dp,
1003 ((par->flags & FFB_FLAG_AFB) ? "AFB" : "FFB"), 1003 ((par->flags & FFB_FLAG_AFB) ? "AFB" : "FFB"),
1004 par->physbase, par->board_type, 1004 par->physbase, par->board_type,
1005 dac_pnum, dac_rev, dac_mrev); 1005 dac_pnum, dac_rev, dac_mrev);
diff --git a/drivers/video/fbdev/fm2fb.c b/drivers/video/fbdev/fm2fb.c
index e69d47af9932..ac7a4ebfd390 100644
--- a/drivers/video/fbdev/fm2fb.c
+++ b/drivers/video/fbdev/fm2fb.c
@@ -213,7 +213,7 @@ static int fm2fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
213 213
214static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id); 214static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id);
215 215
216static struct zorro_device_id fm2fb_devices[] = { 216static const struct zorro_device_id fm2fb_devices[] = {
217 { ZORRO_PROD_BSC_FRAMEMASTER_II }, 217 { ZORRO_PROD_BSC_FRAMEMASTER_II },
218 { ZORRO_PROD_HELFRICH_RAINBOW_II }, 218 { ZORRO_PROD_HELFRICH_RAINBOW_II },
219 { 0 } 219 { 0 }
diff --git a/drivers/video/fbdev/geode/gxfb_core.c b/drivers/video/fbdev/geode/gxfb_core.c
index ec9fc9ac23de..f4f76373b2a8 100644
--- a/drivers/video/fbdev/geode/gxfb_core.c
+++ b/drivers/video/fbdev/geode/gxfb_core.c
@@ -474,7 +474,7 @@ static void gxfb_remove(struct pci_dev *pdev)
474 framebuffer_release(info); 474 framebuffer_release(info);
475} 475}
476 476
477static struct pci_device_id gxfb_id_table[] = { 477static const struct pci_device_id gxfb_id_table[] = {
478 { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_GX_VIDEO) }, 478 { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_GX_VIDEO) },
479 { 0, } 479 { 0, }
480}; 480};
diff --git a/drivers/video/fbdev/grvga.c b/drivers/video/fbdev/grvga.c
index b471f92969b1..8fc8f46dadeb 100644
--- a/drivers/video/fbdev/grvga.c
+++ b/drivers/video/fbdev/grvga.c
@@ -70,7 +70,7 @@ static const struct fb_videomode grvga_modedb[] = {
70 } 70 }
71 }; 71 };
72 72
73static struct fb_fix_screeninfo grvga_fix = { 73static const struct fb_fix_screeninfo grvga_fix = {
74 .id = "AG SVGACTRL", 74 .id = "AG SVGACTRL",
75 .type = FB_TYPE_PACKED_PIXELS, 75 .type = FB_TYPE_PACKED_PIXELS,
76 .visual = FB_VISUAL_PSEUDOCOLOR, 76 .visual = FB_VISUAL_PSEUDOCOLOR,
diff --git a/drivers/video/fbdev/i810/i810_main.c b/drivers/video/fbdev/i810/i810_main.c
index 2488baab7c89..d18f7b31932c 100644
--- a/drivers/video/fbdev/i810/i810_main.c
+++ b/drivers/video/fbdev/i810/i810_main.c
@@ -107,7 +107,7 @@ static const char * const i810_pci_list[] = {
107 "Intel(R) 815 (Internal Graphics with AGP) Framebuffer Device" 107 "Intel(R) 815 (Internal Graphics with AGP) Framebuffer Device"
108}; 108};
109 109
110static struct pci_device_id i810fb_pci_tbl[] = { 110static const struct pci_device_id i810fb_pci_tbl[] = {
111 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG1, 111 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG1,
112 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 112 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
113 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG3, 113 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG3,
@@ -1542,7 +1542,7 @@ static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
1542 return 0; 1542 return 0;
1543} 1543}
1544 1544
1545static struct fb_ops i810fb_ops = { 1545static const struct fb_ops i810fb_ops = {
1546 .owner = THIS_MODULE, 1546 .owner = THIS_MODULE,
1547 .fb_open = i810fb_open, 1547 .fb_open = i810fb_open,
1548 .fb_release = i810fb_release, 1548 .fb_release = i810fb_release,
diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c
index 4363c64d74e8..ecdcf358ad5e 100644
--- a/drivers/video/fbdev/imsttfb.c
+++ b/drivers/video/fbdev/imsttfb.c
@@ -1318,7 +1318,7 @@ imsttfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
1318 } 1318 }
1319} 1319}
1320 1320
1321static struct pci_device_id imsttfb_pci_tbl[] = { 1321static const struct pci_device_id imsttfb_pci_tbl[] = {
1322 { PCI_VENDOR_ID_IMS, PCI_DEVICE_ID_IMS_TT128, 1322 { PCI_VENDOR_ID_IMS, PCI_DEVICE_ID_IMS_TT128,
1323 PCI_ANY_ID, PCI_ANY_ID, 0, 0, IBM }, 1323 PCI_ANY_ID, PCI_ANY_ID, 0, 0, IBM },
1324 { PCI_VENDOR_ID_IMS, PCI_DEVICE_ID_IMS_TT3D, 1324 { PCI_VENDOR_ID_IMS, PCI_DEVICE_ID_IMS_TT3D,
diff --git a/drivers/video/fbdev/intelfb/intelfbdrv.c b/drivers/video/fbdev/intelfb/intelfbdrv.c
index ffc391208b27..d7463a2a5d83 100644
--- a/drivers/video/fbdev/intelfb/intelfbdrv.c
+++ b/drivers/video/fbdev/intelfb/intelfbdrv.c
@@ -173,7 +173,7 @@ static int intelfb_set_fbinfo(struct intelfb_info *dinfo);
173#define INTELFB_CLASS_MASK 0 173#define INTELFB_CLASS_MASK 0
174#endif 174#endif
175 175
176static struct pci_device_id intelfb_pci_table[] = { 176static const struct pci_device_id intelfb_pci_table[] = {
177 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_830M, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_830M }, 177 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_830M, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_830M },
178 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_845G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_845G }, 178 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_845G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_845G },
179 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_85XGM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_85XGM }, 179 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_85XGM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_85XGM },
diff --git a/drivers/video/fbdev/kyro/fbdev.c b/drivers/video/fbdev/kyro/fbdev.c
index f77478fb3d14..a7bd9f25911b 100644
--- a/drivers/video/fbdev/kyro/fbdev.c
+++ b/drivers/video/fbdev/kyro/fbdev.c
@@ -633,7 +633,7 @@ static int kyrofb_ioctl(struct fb_info *info,
633 return 0; 633 return 0;
634} 634}
635 635
636static struct pci_device_id kyrofb_pci_tbl[] = { 636static const struct pci_device_id kyrofb_pci_tbl[] = {
637 { PCI_VENDOR_ID_ST, PCI_DEVICE_ID_STG4000, 637 { PCI_VENDOR_ID_ST, PCI_DEVICE_ID_STG4000,
638 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 638 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
639 { 0, } 639 { 0, }
diff --git a/drivers/video/fbdev/leo.c b/drivers/video/fbdev/leo.c
index 62e59dc90ee6..71862188f528 100644
--- a/drivers/video/fbdev/leo.c
+++ b/drivers/video/fbdev/leo.c
@@ -619,8 +619,8 @@ static int leo_probe(struct platform_device *op)
619 619
620 dev_set_drvdata(&op->dev, info); 620 dev_set_drvdata(&op->dev, info);
621 621
622 printk(KERN_INFO "%s: leo at %lx:%lx\n", 622 printk(KERN_INFO "%pOF: leo at %lx:%lx\n",
623 dp->full_name, 623 dp,
624 par->which_io, info->fix.smem_start); 624 par->which_io, info->fix.smem_start);
625 625
626 return 0; 626 return 0;
diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c
index f6a0b9af97a9..b9b284d79631 100644
--- a/drivers/video/fbdev/matrox/matroxfb_base.c
+++ b/drivers/video/fbdev/matrox/matroxfb_base.c
@@ -1198,7 +1198,7 @@ static int matroxfb_blank(int blank, struct fb_info *info)
1198 return 0; 1198 return 0;
1199} 1199}
1200 1200
1201static struct fb_ops matroxfb_ops = { 1201static const struct fb_ops matroxfb_ops = {
1202 .owner = THIS_MODULE, 1202 .owner = THIS_MODULE,
1203 .fb_open = matroxfb_open, 1203 .fb_open = matroxfb_open,
1204 .fb_release = matroxfb_release, 1204 .fb_release = matroxfb_release,
@@ -1573,14 +1573,14 @@ static struct board {
1573 NULL}}; 1573 NULL}};
1574 1574
1575#ifndef MODULE 1575#ifndef MODULE
1576static struct fb_videomode defaultmode = { 1576static const struct fb_videomode defaultmode = {
1577 /* 640x480 @ 60Hz, 31.5 kHz */ 1577 /* 640x480 @ 60Hz, 31.5 kHz */
1578 NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2, 1578 NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
1579 0, FB_VMODE_NONINTERLACED 1579 0, FB_VMODE_NONINTERLACED
1580}; 1580};
1581#endif /* !MODULE */
1582 1581
1583static int hotplug = 0; 1582static int hotplug = 0;
1583#endif /* !MODULE */
1584 1584
1585static void setDefaultOutputs(struct matrox_fb_info *minfo) 1585static void setDefaultOutputs(struct matrox_fb_info *minfo)
1586{ 1586{
@@ -1623,7 +1623,7 @@ static int initMatrox2(struct matrox_fb_info *minfo, struct board *b)
1623 unsigned int memsize; 1623 unsigned int memsize;
1624 int err; 1624 int err;
1625 1625
1626 static struct pci_device_id intel_82437[] = { 1626 static const struct pci_device_id intel_82437[] = {
1627 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437) }, 1627 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437) },
1628 { }, 1628 { },
1629 }; 1629 };
@@ -1794,9 +1794,7 @@ static int initMatrox2(struct matrox_fb_info *minfo, struct board *b)
1794 minfo->fbops = matroxfb_ops; 1794 minfo->fbops = matroxfb_ops;
1795 minfo->fbcon.fbops = &minfo->fbops; 1795 minfo->fbcon.fbops = &minfo->fbops;
1796 minfo->fbcon.pseudo_palette = minfo->cmap; 1796 minfo->fbcon.pseudo_palette = minfo->cmap;
1797 /* after __init time we are like module... no logo */ 1797 minfo->fbcon.flags = FBINFO_PARTIAL_PAN_OK | /* Prefer panning for scroll under MC viewer/edit */
1798 minfo->fbcon.flags = hotplug ? FBINFO_FLAG_MODULE : FBINFO_FLAG_DEFAULT;
1799 minfo->fbcon.flags |= FBINFO_PARTIAL_PAN_OK | /* Prefer panning for scroll under MC viewer/edit */
1800 FBINFO_HWACCEL_COPYAREA | /* We have hw-assisted bmove */ 1798 FBINFO_HWACCEL_COPYAREA | /* We have hw-assisted bmove */
1801 FBINFO_HWACCEL_FILLRECT | /* And fillrect */ 1799 FBINFO_HWACCEL_FILLRECT | /* And fillrect */
1802 FBINFO_HWACCEL_IMAGEBLIT | /* And imageblit */ 1800 FBINFO_HWACCEL_IMAGEBLIT | /* And imageblit */
@@ -2116,7 +2114,7 @@ static void pci_remove_matrox(struct pci_dev* pdev) {
2116 matroxfb_remove(minfo, 1); 2114 matroxfb_remove(minfo, 1);
2117} 2115}
2118 2116
2119static struct pci_device_id matroxfb_devices[] = { 2117static const struct pci_device_id matroxfb_devices[] = {
2120#ifdef CONFIG_FB_MATROX_MILLENIUM 2118#ifdef CONFIG_FB_MATROX_MILLENIUM
2121 {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MIL, 2119 {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MIL,
2122 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 2120 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
diff --git a/drivers/video/fbdev/maxinefb.c b/drivers/video/fbdev/maxinefb.c
index cab7333208ea..5bb1b5c308a7 100644
--- a/drivers/video/fbdev/maxinefb.c
+++ b/drivers/video/fbdev/maxinefb.c
@@ -39,7 +39,7 @@
39 39
40static struct fb_info fb_info; 40static struct fb_info fb_info;
41 41
42static struct fb_var_screeninfo maxinefb_defined = { 42static const struct fb_var_screeninfo maxinefb_defined = {
43 .xres = 1024, 43 .xres = 1024,
44 .yres = 768, 44 .yres = 768,
45 .xres_virtual = 1024, 45 .xres_virtual = 1024,
diff --git a/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c b/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
index f9ec5c0484fa..cd372527c9e4 100644
--- a/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
+++ b/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
@@ -982,7 +982,7 @@ static inline int mb862xx_pci_gdc_init(struct mb862xxfb_par *par)
982#define CHIP_ID(id) \ 982#define CHIP_ID(id) \
983 { PCI_DEVICE(PCI_VENDOR_ID_FUJITSU_LIMITED, id) } 983 { PCI_DEVICE(PCI_VENDOR_ID_FUJITSU_LIMITED, id) }
984 984
985static struct pci_device_id mb862xx_pci_tbl[] = { 985static const struct pci_device_id mb862xx_pci_tbl[] = {
986 /* MB86295/MB86296 */ 986 /* MB86295/MB86296 */
987 CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALP), 987 CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALP),
988 CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALPA), 988 CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALPA),
diff --git a/drivers/video/fbdev/mbx/mbxfb.c b/drivers/video/fbdev/mbx/mbxfb.c
index 698df9543e30..539b85da0897 100644
--- a/drivers/video/fbdev/mbx/mbxfb.c
+++ b/drivers/video/fbdev/mbx/mbxfb.c
@@ -79,7 +79,7 @@ struct mbxfb_info {
79 79
80}; 80};
81 81
82static struct fb_var_screeninfo mbxfb_default = { 82static const struct fb_var_screeninfo mbxfb_default = {
83 .xres = 640, 83 .xres = 640,
84 .yres = 480, 84 .yres = 480,
85 .xres_virtual = 640, 85 .xres_virtual = 640,
@@ -102,7 +102,7 @@ static struct fb_var_screeninfo mbxfb_default = {
102 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 102 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
103}; 103};
104 104
105static struct fb_fix_screeninfo mbxfb_fix = { 105static const struct fb_fix_screeninfo mbxfb_fix = {
106 .id = "MBX", 106 .id = "MBX",
107 .type = FB_TYPE_PACKED_PIXELS, 107 .type = FB_TYPE_PACKED_PIXELS,
108 .visual = FB_VISUAL_TRUECOLOR, 108 .visual = FB_VISUAL_TRUECOLOR,
diff --git a/drivers/video/fbdev/neofb.c b/drivers/video/fbdev/neofb.c
index db023a97d1ea..5d3a444083f7 100644
--- a/drivers/video/fbdev/neofb.c
+++ b/drivers/video/fbdev/neofb.c
@@ -2138,7 +2138,7 @@ static void neofb_remove(struct pci_dev *dev)
2138 } 2138 }
2139} 2139}
2140 2140
2141static struct pci_device_id neofb_devices[] = { 2141static const struct pci_device_id neofb_devices[] = {
2142 {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2070, 2142 {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2070,
2143 PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2070}, 2143 PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2070},
2144 2144
diff --git a/drivers/video/fbdev/nvidia/nvidia.c b/drivers/video/fbdev/nvidia/nvidia.c
index ce7dab7299fe..418a2d0d06a9 100644
--- a/drivers/video/fbdev/nvidia/nvidia.c
+++ b/drivers/video/fbdev/nvidia/nvidia.c
@@ -55,7 +55,7 @@
55/* HW cursor parameters */ 55/* HW cursor parameters */
56#define MAX_CURS 32 56#define MAX_CURS 32
57 57
58static struct pci_device_id nvidiafb_pci_tbl[] = { 58static const struct pci_device_id nvidiafb_pci_tbl[] = {
59 {PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 59 {PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
60 PCI_BASE_CLASS_DISPLAY << 16, 0xff0000, 0}, 60 PCI_BASE_CLASS_DISPLAY << 16, 0xff0000, 0},
61 { 0, } 61 { 0, }
diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c
index 9be884b0c778..90d38de34479 100644
--- a/drivers/video/fbdev/offb.c
+++ b/drivers/video/fbdev/offb.c
@@ -383,7 +383,7 @@ static void offb_init_palette_hacks(struct fb_info *info, struct device_node *dp
383 FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_STATIC_PSEUDOCOLOR; 383 FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_STATIC_PSEUDOCOLOR;
384} 384}
385 385
386static void __init offb_init_fb(const char *name, const char *full_name, 386static void __init offb_init_fb(const char *name,
387 int width, int height, int depth, 387 int width, int height, int depth,
388 int pitch, unsigned long address, 388 int pitch, unsigned long address,
389 int foreign_endian, struct device_node *dp) 389 int foreign_endian, struct device_node *dp)
@@ -402,14 +402,13 @@ static void __init offb_init_fb(const char *name, const char *full_name,
402 "Using unsupported %dx%d %s at %lx, depth=%d, pitch=%d\n", 402 "Using unsupported %dx%d %s at %lx, depth=%d, pitch=%d\n",
403 width, height, name, address, depth, pitch); 403 width, height, name, address, depth, pitch);
404 if (depth != 8 && depth != 15 && depth != 16 && depth != 32) { 404 if (depth != 8 && depth != 15 && depth != 16 && depth != 32) {
405 printk(KERN_ERR "%s: can't use depth = %d\n", full_name, 405 printk(KERN_ERR "%pOF: can't use depth = %d\n", dp, depth);
406 depth);
407 release_mem_region(res_start, res_size); 406 release_mem_region(res_start, res_size);
408 return; 407 return;
409 } 408 }
410 409
411 info = framebuffer_alloc(sizeof(u32) * 16, NULL); 410 info = framebuffer_alloc(sizeof(u32) * 16, NULL);
412 411
413 if (info == 0) { 412 if (info == 0) {
414 release_mem_region(res_start, res_size); 413 release_mem_region(res_start, res_size);
415 return; 414 return;
@@ -515,7 +514,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
515 if (register_framebuffer(info) < 0) 514 if (register_framebuffer(info) < 0)
516 goto out_err; 515 goto out_err;
517 516
518 fb_info(info, "Open Firmware frame buffer device on %s\n", full_name); 517 fb_info(info, "Open Firmware frame buffer device on %pOF\n", dp);
519 return; 518 return;
520 519
521out_err: 520out_err:
@@ -644,7 +643,6 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)
644 if (strcmp(dp->name, "valkyrie") == 0) 643 if (strcmp(dp->name, "valkyrie") == 0)
645 address += 0x1000; 644 address += 0x1000;
646 offb_init_fb(no_real_node ? "bootx" : dp->name, 645 offb_init_fb(no_real_node ? "bootx" : dp->name,
647 no_real_node ? "display" : dp->full_name,
648 width, height, depth, pitch, address, 646 width, height, depth, pitch, address,
649 foreign_endian, no_real_node ? NULL : dp); 647 foreign_endian, no_real_node ? NULL : dp);
650 } 648 }
diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c
index df9e6ebcfad5..e3a85432f926 100644
--- a/drivers/video/fbdev/omap/lcd_mipid.c
+++ b/drivers/video/fbdev/omap/lcd_mipid.c
@@ -496,7 +496,7 @@ static void mipid_cleanup(struct lcd_panel *panel)
496 mipid_esd_stop_check(md); 496 mipid_esd_stop_check(md);
497} 497}
498 498
499static struct lcd_panel mipid_panel = { 499static const struct lcd_panel mipid_panel = {
500 .config = OMAP_LCDC_PANEL_TFT, 500 .config = OMAP_LCDC_PANEL_TFT,
501 501
502 .bpp = 16, 502 .bpp = 16,
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c
index f14691ce8d02..6cd759c01037 100644
--- a/drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c
+++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c
@@ -18,7 +18,7 @@
18 18
19#include <video/omapfb_dss.h> 19#include <video/omapfb_dss.h>
20 20
21static struct omap_video_timings lb035q02_timings = { 21static const struct omap_video_timings lb035q02_timings = {
22 .x_res = 320, 22 .x_res = 320,
23 .y_res = 240, 23 .y_res = 240,
24 24
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c
index 468560a6daae..f2c2fef3db74 100644
--- a/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c
+++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c
@@ -509,7 +509,7 @@ static struct attribute *bldev_attrs[] = {
509 NULL, 509 NULL,
510}; 510};
511 511
512static struct attribute_group bldev_attr_group = { 512static const struct attribute_group bldev_attr_group = {
513 .attrs = bldev_attrs, 513 .attrs = bldev_attrs,
514}; 514};
515 515
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c
index b529a8c2b652..57e9e146ff74 100644
--- a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c
+++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c
@@ -41,7 +41,7 @@ struct panel_drv_data {
41 struct spi_device *spi_dev; 41 struct spi_device *spi_dev;
42}; 42};
43 43
44static struct omap_video_timings td028ttec1_panel_timings = { 44static const struct omap_video_timings td028ttec1_panel_timings = {
45 .x_res = 480, 45 .x_res = 480,
46 .y_res = 640, 46 .y_res = 640,
47 .pixelclock = 22153000, 47 .pixelclock = 22153000,
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
index 51e628b85f4a..ea8c79a42b41 100644
--- a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
+++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
@@ -282,7 +282,7 @@ static struct attribute *tpo_td043_attrs[] = {
282 NULL, 282 NULL,
283}; 283};
284 284
285static struct attribute_group tpo_td043_attr_group = { 285static const struct attribute_group tpo_td043_attr_group = {
286 .attrs = tpo_td043_attrs, 286 .attrs = tpo_td043_attrs,
287}; 287};
288 288
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
index d356a252ab4a..f1eb8b0f8a2a 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
@@ -16,6 +16,7 @@
16#include <linux/err.h> 16#include <linux/err.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/of.h> 18#include <linux/of.h>
19#include <linux/of_graph.h>
19#include <linux/seq_file.h> 20#include <linux/seq_file.h>
20 21
21#include <video/omapfb_dss.h> 22#include <video/omapfb_dss.h>
@@ -128,7 +129,7 @@ static struct device_node *omapdss_of_get_remote_port(const struct device_node *
128{ 129{
129 struct device_node *np; 130 struct device_node *np;
130 131
131 np = of_parse_phandle(node, "remote-endpoint", 0); 132 np = of_graph_get_remote_endpoint(node);
132 if (!np) 133 if (!np)
133 return NULL; 134 return NULL;
134 135
diff --git a/drivers/video/fbdev/p9100.c b/drivers/video/fbdev/p9100.c
index 1f6ee76af878..64de5cda541d 100644
--- a/drivers/video/fbdev/p9100.c
+++ b/drivers/video/fbdev/p9100.c
@@ -304,8 +304,8 @@ static int p9100_probe(struct platform_device *op)
304 304
305 dev_set_drvdata(&op->dev, info); 305 dev_set_drvdata(&op->dev, info);
306 306
307 printk(KERN_INFO "%s: p9100 at %lx:%lx\n", 307 printk(KERN_INFO "%pOF: p9100 at %lx:%lx\n",
308 dp->full_name, 308 dp,
309 par->which_io, info->fix.smem_start); 309 par->which_io, info->fix.smem_start);
310 310
311 return 0; 311 return 0;
diff --git a/drivers/video/fbdev/pm2fb.c b/drivers/video/fbdev/pm2fb.c
index 1a4070f719c2..bd6c2f5f6095 100644
--- a/drivers/video/fbdev/pm2fb.c
+++ b/drivers/video/fbdev/pm2fb.c
@@ -1732,7 +1732,7 @@ static void pm2fb_remove(struct pci_dev *pdev)
1732 framebuffer_release(info); 1732 framebuffer_release(info);
1733} 1733}
1734 1734
1735static struct pci_device_id pm2fb_id_table[] = { 1735static const struct pci_device_id pm2fb_id_table[] = {
1736 { PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_TVP4020, 1736 { PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_TVP4020,
1737 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 1737 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
1738 { PCI_VENDOR_ID_3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2, 1738 { PCI_VENDOR_ID_3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2,
diff --git a/drivers/video/fbdev/pm3fb.c b/drivers/video/fbdev/pm3fb.c
index 6ff5077a2e15..6130aa56a1e9 100644
--- a/drivers/video/fbdev/pm3fb.c
+++ b/drivers/video/fbdev/pm3fb.c
@@ -1479,7 +1479,7 @@ static void pm3fb_remove(struct pci_dev *dev)
1479 } 1479 }
1480} 1480}
1481 1481
1482static struct pci_device_id pm3fb_id_table[] = { 1482static const struct pci_device_id pm3fb_id_table[] = {
1483 { PCI_VENDOR_ID_3DLABS, 0x0a, 1483 { PCI_VENDOR_ID_3DLABS, 0x0a,
1484 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 1484 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
1485 { 0, } 1485 { 0, }
diff --git a/drivers/video/fbdev/pmag-aa-fb.c b/drivers/video/fbdev/pmag-aa-fb.c
index 39922f072db4..ca7e9390d1e7 100644
--- a/drivers/video/fbdev/pmag-aa-fb.c
+++ b/drivers/video/fbdev/pmag-aa-fb.c
@@ -67,7 +67,7 @@ struct aafb_par {
67 struct bt431_regs __iomem *bt431; 67 struct bt431_regs __iomem *bt431;
68}; 68};
69 69
70static struct fb_var_screeninfo aafb_defined = { 70static const struct fb_var_screeninfo aafb_defined = {
71 .xres = 1280, 71 .xres = 1280,
72 .yres = 1024, 72 .yres = 1024,
73 .xres_virtual = 2048, 73 .xres_virtual = 2048,
@@ -90,7 +90,7 @@ static struct fb_var_screeninfo aafb_defined = {
90 .vmode = FB_VMODE_NONINTERLACED, 90 .vmode = FB_VMODE_NONINTERLACED,
91}; 91};
92 92
93static struct fb_fix_screeninfo aafb_fix = { 93static const struct fb_fix_screeninfo aafb_fix = {
94 .id = "PMAG-AA", 94 .id = "PMAG-AA",
95 .smem_len = (2048 * 1024), 95 .smem_len = (2048 * 1024),
96 .type = FB_TYPE_PACKED_PIXELS, 96 .type = FB_TYPE_PACKED_PIXELS,
diff --git a/drivers/video/fbdev/pmag-ba-fb.c b/drivers/video/fbdev/pmag-ba-fb.c
index 1fd02f40708e..3b9249449ea6 100644
--- a/drivers/video/fbdev/pmag-ba-fb.c
+++ b/drivers/video/fbdev/pmag-ba-fb.c
@@ -43,7 +43,7 @@ struct pmagbafb_par {
43}; 43};
44 44
45 45
46static struct fb_var_screeninfo pmagbafb_defined = { 46static const struct fb_var_screeninfo pmagbafb_defined = {
47 .xres = 1024, 47 .xres = 1024,
48 .yres = 864, 48 .yres = 864,
49 .xres_virtual = 1024, 49 .xres_virtual = 1024,
@@ -67,7 +67,7 @@ static struct fb_var_screeninfo pmagbafb_defined = {
67 .vmode = FB_VMODE_NONINTERLACED, 67 .vmode = FB_VMODE_NONINTERLACED,
68}; 68};
69 69
70static struct fb_fix_screeninfo pmagbafb_fix = { 70static const struct fb_fix_screeninfo pmagbafb_fix = {
71 .id = "PMAG-BA", 71 .id = "PMAG-BA",
72 .smem_len = (1024 * 1024), 72 .smem_len = (1024 * 1024),
73 .type = FB_TYPE_PACKED_PIXELS, 73 .type = FB_TYPE_PACKED_PIXELS,
diff --git a/drivers/video/fbdev/pmagb-b-fb.c b/drivers/video/fbdev/pmagb-b-fb.c
index 46e96c451506..e58df36233c4 100644
--- a/drivers/video/fbdev/pmagb-b-fb.c
+++ b/drivers/video/fbdev/pmagb-b-fb.c
@@ -44,7 +44,7 @@ struct pmagbbfb_par {
44}; 44};
45 45
46 46
47static struct fb_var_screeninfo pmagbbfb_defined = { 47static const struct fb_var_screeninfo pmagbbfb_defined = {
48 .bits_per_pixel = 8, 48 .bits_per_pixel = 8,
49 .red.length = 8, 49 .red.length = 8,
50 .green.length = 8, 50 .green.length = 8,
@@ -57,7 +57,7 @@ static struct fb_var_screeninfo pmagbbfb_defined = {
57 .vmode = FB_VMODE_NONINTERLACED, 57 .vmode = FB_VMODE_NONINTERLACED,
58}; 58};
59 59
60static struct fb_fix_screeninfo pmagbbfb_fix = { 60static const struct fb_fix_screeninfo pmagbbfb_fix = {
61 .id = "PMAGB-BA", 61 .id = "PMAGB-BA",
62 .smem_len = (2048 * 1024), 62 .smem_len = (2048 * 1024),
63 .type = FB_TYPE_PACKED_PIXELS, 63 .type = FB_TYPE_PACKED_PIXELS,
diff --git a/drivers/video/fbdev/ps3fb.c b/drivers/video/fbdev/ps3fb.c
index b269abd932aa..5ed2db39d823 100644
--- a/drivers/video/fbdev/ps3fb.c
+++ b/drivers/video/fbdev/ps3fb.c
@@ -952,7 +952,7 @@ static struct fb_ops ps3fb_ops = {
952 .fb_compat_ioctl = ps3fb_ioctl 952 .fb_compat_ioctl = ps3fb_ioctl
953}; 953};
954 954
955static struct fb_fix_screeninfo ps3fb_fix = { 955static const struct fb_fix_screeninfo ps3fb_fix = {
956 .id = DEVICE_NAME, 956 .id = DEVICE_NAME,
957 .type = FB_TYPE_PACKED_PIXELS, 957 .type = FB_TYPE_PACKED_PIXELS,
958 .visual = FB_VISUAL_TRUECOLOR, 958 .visual = FB_VISUAL_TRUECOLOR,
diff --git a/drivers/video/fbdev/pvr2fb.c b/drivers/video/fbdev/pvr2fb.c
index a2564ab91e62..867c5218968f 100644
--- a/drivers/video/fbdev/pvr2fb.c
+++ b/drivers/video/fbdev/pvr2fb.c
@@ -154,7 +154,7 @@ static struct fb_fix_screeninfo pvr2_fix = {
154 .accel = FB_ACCEL_NONE, 154 .accel = FB_ACCEL_NONE,
155}; 155};
156 156
157static struct fb_var_screeninfo pvr2_var = { 157static const struct fb_var_screeninfo pvr2_var = {
158 .xres = 640, 158 .xres = 640,
159 .yres = 480, 159 .yres = 480,
160 .xres_virtual = 640, 160 .xres_virtual = 640,
@@ -966,7 +966,7 @@ static void pvr2fb_pci_remove(struct pci_dev *pdev)
966 pci_release_regions(pdev); 966 pci_release_regions(pdev);
967} 967}
968 968
969static struct pci_device_id pvr2fb_pci_tbl[] = { 969static const struct pci_device_id pvr2fb_pci_tbl[] = {
970 { PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NEON250, 970 { PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NEON250,
971 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 971 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
972 { 0, }, 972 { 0, },
diff --git a/drivers/video/fbdev/pxa3xx-gcu.c b/drivers/video/fbdev/pxa3xx-gcu.c
index 50bce45e7f3d..933619da1a94 100644
--- a/drivers/video/fbdev/pxa3xx-gcu.c
+++ b/drivers/video/fbdev/pxa3xx-gcu.c
@@ -626,8 +626,8 @@ static int pxa3xx_gcu_probe(struct platform_device *pdev)
626 /* request the IRQ */ 626 /* request the IRQ */
627 irq = platform_get_irq(pdev, 0); 627 irq = platform_get_irq(pdev, 0);
628 if (irq < 0) { 628 if (irq < 0) {
629 dev_err(dev, "no IRQ defined\n"); 629 dev_err(dev, "no IRQ defined: %d\n", irq);
630 return -ENODEV; 630 return irq;
631 } 631 }
632 632
633 ret = devm_request_irq(dev, irq, pxa3xx_gcu_handle_irq, 633 ret = devm_request_irq(dev, irq, pxa3xx_gcu_handle_irq,
diff --git a/drivers/video/fbdev/q40fb.c b/drivers/video/fbdev/q40fb.c
index 04ea330ccf5d..0b93aa964d43 100644
--- a/drivers/video/fbdev/q40fb.c
+++ b/drivers/video/fbdev/q40fb.c
@@ -36,7 +36,7 @@ static struct fb_fix_screeninfo q40fb_fix = {
36 .accel = FB_ACCEL_NONE, 36 .accel = FB_ACCEL_NONE,
37}; 37};
38 38
39static struct fb_var_screeninfo q40fb_var = { 39static const struct fb_var_screeninfo q40fb_var = {
40 .xres = 1024, 40 .xres = 1024,
41 .yres = 512, 41 .yres = 512,
42 .xres_virtual = 1024, 42 .xres_virtual = 1024,
diff --git a/drivers/video/fbdev/riva/fbdev.c b/drivers/video/fbdev/riva/fbdev.c
index 2ef26ad99341..1ea78bb911fb 100644
--- a/drivers/video/fbdev/riva/fbdev.c
+++ b/drivers/video/fbdev/riva/fbdev.c
@@ -101,7 +101,7 @@ static int rivafb_blank(int blank, struct fb_info *info);
101 * 101 *
102 * ------------------------------------------------------------------------- */ 102 * ------------------------------------------------------------------------- */
103 103
104static struct pci_device_id rivafb_pci_tbl[] = { 104static const struct pci_device_id rivafb_pci_tbl[] = {
105 { PCI_VENDOR_ID_NVIDIA_SGS, PCI_DEVICE_ID_NVIDIA_SGS_RIVA128, 105 { PCI_VENDOR_ID_NVIDIA_SGS, PCI_DEVICE_ID_NVIDIA_SGS_RIVA128,
106 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 106 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
107 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TNT, 107 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TNT,
diff --git a/drivers/video/fbdev/s3fb.c b/drivers/video/fbdev/s3fb.c
index 13b109073c63..d63f23e26f7d 100644
--- a/drivers/video/fbdev/s3fb.c
+++ b/drivers/video/fbdev/s3fb.c
@@ -1483,7 +1483,7 @@ static int s3_pci_resume(struct pci_dev* dev)
1483 1483
1484/* List of boards that we are trying to support */ 1484/* List of boards that we are trying to support */
1485 1485
1486static struct pci_device_id s3_devices[] = { 1486static const struct pci_device_id s3_devices[] = {
1487 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8810), .driver_data = CHIP_XXX_TRIO}, 1487 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8810), .driver_data = CHIP_XXX_TRIO},
1488 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8811), .driver_data = CHIP_XXX_TRIO}, 1488 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8811), .driver_data = CHIP_XXX_TRIO},
1489 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP}, 1489 {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP},
diff --git a/drivers/video/fbdev/savage/savagefb_driver.c b/drivers/video/fbdev/savage/savagefb_driver.c
index c30a91c1137c..c20468362f11 100644
--- a/drivers/video/fbdev/savage/savagefb_driver.c
+++ b/drivers/video/fbdev/savage/savagefb_driver.c
@@ -2429,7 +2429,7 @@ static int savagefb_resume(struct pci_dev* dev)
2429} 2429}
2430 2430
2431 2431
2432static struct pci_device_id savagefb_devices[] = { 2432static const struct pci_device_id savagefb_devices[] = {
2433 {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX128, 2433 {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX128,
2434 PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE}, 2434 PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
2435 2435
diff --git a/drivers/video/fbdev/sis/init301.c b/drivers/video/fbdev/sis/init301.c
index 20f7234e809e..1ec9c3e0e1d8 100644
--- a/drivers/video/fbdev/sis/init301.c
+++ b/drivers/video/fbdev/sis/init301.c
@@ -6848,8 +6848,6 @@ SiS_SetGroup2(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short
6848 if(SiS_Pr->SiS_VGAHDE >= 1280) { 6848 if(SiS_Pr->SiS_VGAHDE >= 1280) {
6849 tempch = 20; 6849 tempch = 20;
6850 tempbx &= ~0x20; 6850 tempbx &= ~0x20;
6851 } else if(SiS_Pr->SiS_VGAHDE >= 1024) {
6852 tempch = 25;
6853 } else { 6851 } else {
6854 tempch = 25; /* OK */ 6852 tempch = 25; /* OK */
6855 } 6853 }
@@ -7964,14 +7962,9 @@ SiS_SetCHTVReg(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short
7964 } 7962 }
7965 } 7963 }
7966 } else { /* ---- PAL ---- */ 7964 } else { /* ---- PAL ---- */
7967 /* We don't play around with FSCI in PAL mode */ 7965 /* We don't play around with FSCI in PAL mode */
7968 if(resindex == 0x04) { 7966 SiS_SetCH70xxANDOR(SiS_Pr, 0x20, 0x00, 0xEF); /* loop filter off */
7969 SiS_SetCH70xxANDOR(SiS_Pr,0x20,0x00,0xEF); /* loop filter off */ 7967 SiS_SetCH70xxANDOR(SiS_Pr, 0x21, 0x01, 0xFE); /* ACIV on */
7970 SiS_SetCH70xxANDOR(SiS_Pr,0x21,0x01,0xFE); /* ACIV on */
7971 } else {
7972 SiS_SetCH70xxANDOR(SiS_Pr,0x20,0x00,0xEF); /* loop filter off */
7973 SiS_SetCH70xxANDOR(SiS_Pr,0x21,0x01,0xFE); /* ACIV on */
7974 }
7975 } 7968 }
7976 7969
7977#endif /* 300 */ 7970#endif /* 300 */
@@ -9657,8 +9650,6 @@ SetDelayComp(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
9657 delay = 0x0a; 9650 delay = 0x0a;
9658 } else if(IS_SIS740) { 9651 } else if(IS_SIS740) {
9659 delay = 0x00; 9652 delay = 0x00;
9660 } else if(SiS_Pr->ChipType < SIS_330) {
9661 delay = 0x0c;
9662 } else { 9653 } else {
9663 delay = 0x0c; 9654 delay = 0x0c;
9664 } 9655 }
diff --git a/drivers/video/fbdev/skeletonfb.c b/drivers/video/fbdev/skeletonfb.c
index e219a0a22077..7f4e908330bf 100644
--- a/drivers/video/fbdev/skeletonfb.c
+++ b/drivers/video/fbdev/skeletonfb.c
@@ -84,7 +84,7 @@ struct xxx_par;
84 * if we don't use modedb. If we do use modedb see xxxfb_init how to use it 84 * if we don't use modedb. If we do use modedb see xxxfb_init how to use it
85 * to get a fb_var_screeninfo. Otherwise define a default var as well. 85 * to get a fb_var_screeninfo. Otherwise define a default var as well.
86 */ 86 */
87static struct fb_fix_screeninfo xxxfb_fix = { 87static const struct fb_fix_screeninfo xxxfb_fix = {
88 .id = "FB's name", 88 .id = "FB's name",
89 .type = FB_TYPE_PACKED_PIXELS, 89 .type = FB_TYPE_PACKED_PIXELS,
90 .visual = FB_VISUAL_PSEUDOCOLOR, 90 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -866,7 +866,7 @@ static int xxxfb_resume(struct pci_dev *dev)
866#define xxxfb_resume NULL 866#define xxxfb_resume NULL
867#endif /* CONFIG_PM */ 867#endif /* CONFIG_PM */
868 868
869static struct pci_device_id xxxfb_id_table[] = { 869static const struct pci_device_id xxxfb_id_table[] = {
870 { PCI_VENDOR_ID_XXX, PCI_DEVICE_ID_XXX, 870 { PCI_VENDOR_ID_XXX, PCI_DEVICE_ID_XXX,
871 PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16, 871 PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
872 PCI_CLASS_MASK, 0 }, 872 PCI_CLASS_MASK, 0 },
diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c
index 67e314fdd947..076dd2711630 100644
--- a/drivers/video/fbdev/sm501fb.c
+++ b/drivers/video/fbdev/sm501fb.c
@@ -46,7 +46,7 @@
46static char *fb_mode = "640x480-16@60"; 46static char *fb_mode = "640x480-16@60";
47static unsigned long default_bpp = 16; 47static unsigned long default_bpp = 16;
48 48
49static struct fb_videomode sm501_default_mode = { 49static const struct fb_videomode sm501_default_mode = {
50 .refresh = 60, 50 .refresh = 60,
51 .xres = 640, 51 .xres = 640,
52 .yres = 480, 52 .yres = 480,
diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c
index 73cb4ffff3c5..502d0de2feec 100644
--- a/drivers/video/fbdev/sm712fb.c
+++ b/drivers/video/fbdev/sm712fb.c
@@ -33,8 +33,8 @@
33#include "sm712.h" 33#include "sm712.h"
34 34
35/* 35/*
36* Private structure 36 * Private structure
37*/ 37 */
38struct smtcfb_info { 38struct smtcfb_info {
39 struct pci_dev *pdev; 39 struct pci_dev *pdev;
40 struct fb_info *fb; 40 struct fb_info *fb;
@@ -785,7 +785,7 @@ static void __init sm7xx_vga_setup(char *options)
785 smtc_scr_info.lfb_height = 0; 785 smtc_scr_info.lfb_height = 0;
786 smtc_scr_info.lfb_depth = 0; 786 smtc_scr_info.lfb_depth = 0;
787 787
788 pr_debug("sm7xx_vga_setup = %s\n", options); 788 pr_debug("%s = %s\n", __func__, options);
789 789
790 for (i = 0; i < ARRAY_SIZE(vesa_mode_table); i++) { 790 for (i = 0; i < ARRAY_SIZE(vesa_mode_table); i++) {
791 if (strstr(options, vesa_mode_table[i].index)) { 791 if (strstr(options, vesa_mode_table[i].index)) {
@@ -798,8 +798,8 @@ static void __init sm7xx_vga_setup(char *options)
798 } 798 }
799} 799}
800 800
801static void sm712_setpalette(int regno, unsigned red, unsigned green, 801static void sm712_setpalette(int regno, unsigned int red, unsigned int green,
802 unsigned blue, struct fb_info *info) 802 unsigned int blue, struct fb_info *info)
803{ 803{
804 /* set bit 5:4 = 01 (write LCD RAM only) */ 804 /* set bit 5:4 = 01 (write LCD RAM only) */
805 smtc_seqw(0x66, (smtc_seqr(0x66) & 0xC3) | 0x10); 805 smtc_seqw(0x66, (smtc_seqr(0x66) & 0xC3) | 0x10);
@@ -896,8 +896,9 @@ static int smtc_blank(int blank_mode, struct fb_info *info)
896 return 0; 896 return 0;
897} 897}
898 898
899static int smtc_setcolreg(unsigned regno, unsigned red, unsigned green, 899static int smtc_setcolreg(unsigned int regno, unsigned int red,
900 unsigned blue, unsigned trans, struct fb_info *info) 900 unsigned int green, unsigned int blue,
901 unsigned int trans, struct fb_info *info)
901{ 902{
902 struct smtcfb_info *sfb; 903 struct smtcfb_info *sfb;
903 u32 val; 904 u32 val;
@@ -1477,7 +1478,7 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
1477 } 1478 }
1478 1479
1479 /* can support 32 bpp */ 1480 /* can support 32 bpp */
1480 if (15 == sfb->fb->var.bits_per_pixel) 1481 if (sfb->fb->var.bits_per_pixel == 15)
1481 sfb->fb->var.bits_per_pixel = 16; 1482 sfb->fb->var.bits_per_pixel = 16;
1482 1483
1483 sfb->fb->var.xres_virtual = sfb->fb->var.xres; 1484 sfb->fb->var.xres_virtual = sfb->fb->var.xres;
diff --git a/drivers/video/fbdev/smscufx.c b/drivers/video/fbdev/smscufx.c
index 449fceaf79d5..2275e80b5776 100644
--- a/drivers/video/fbdev/smscufx.c
+++ b/drivers/video/fbdev/smscufx.c
@@ -122,7 +122,7 @@ static const u32 smscufx_info_flags = FBINFO_DEFAULT | FBINFO_READS_FAST |
122 FBINFO_VIRTFB | FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT | 122 FBINFO_VIRTFB | FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT |
123 FBINFO_HWACCEL_COPYAREA | FBINFO_MISC_ALWAYS_SETPAR; 123 FBINFO_HWACCEL_COPYAREA | FBINFO_MISC_ALWAYS_SETPAR;
124 124
125static struct usb_device_id id_table[] = { 125static const struct usb_device_id id_table[] = {
126 {USB_DEVICE(0x0424, 0x9d00),}, 126 {USB_DEVICE(0x0424, 0x9d00),},
127 {USB_DEVICE(0x0424, 0x9d01),}, 127 {USB_DEVICE(0x0424, 0x9d01),},
128 {}, 128 {},
diff --git a/drivers/video/fbdev/sunxvr1000.c b/drivers/video/fbdev/sunxvr1000.c
index fb37f6e05391..8fe37c0ef2f5 100644
--- a/drivers/video/fbdev/sunxvr1000.c
+++ b/drivers/video/fbdev/sunxvr1000.c
@@ -33,8 +33,8 @@ static int gfb_get_props(struct gfb_info *gp)
33 gp->depth = of_getintprop_default(gp->of_node, "depth", 32); 33 gp->depth = of_getintprop_default(gp->of_node, "depth", 32);
34 34
35 if (!gp->width || !gp->height) { 35 if (!gp->width || !gp->height) {
36 printk(KERN_ERR "gfb: Critical properties missing for %s\n", 36 printk(KERN_ERR "gfb: Critical properties missing for %pOF\n",
37 gp->of_node->full_name); 37 gp->of_node);
38 return -EINVAL; 38 return -EINVAL;
39 } 39 }
40 40
@@ -151,12 +151,12 @@ static int gfb_probe(struct platform_device *op)
151 if (err) 151 if (err)
152 goto err_unmap_fb; 152 goto err_unmap_fb;
153 153
154 printk("gfb: Found device at %s\n", dp->full_name); 154 printk("gfb: Found device at %pOF\n", dp);
155 155
156 err = register_framebuffer(info); 156 err = register_framebuffer(info);
157 if (err < 0) { 157 if (err < 0) {
158 printk(KERN_ERR "gfb: Could not register framebuffer %s\n", 158 printk(KERN_ERR "gfb: Could not register framebuffer %pOF\n",
159 dp->full_name); 159 dp);
160 goto err_unmap_fb; 160 goto err_unmap_fb;
161 } 161 }
162 162
diff --git a/drivers/video/fbdev/sunxvr2500.c b/drivers/video/fbdev/sunxvr2500.c
index 1a053292f2eb..544465ba1dc0 100644
--- a/drivers/video/fbdev/sunxvr2500.c
+++ b/drivers/video/fbdev/sunxvr2500.c
@@ -220,7 +220,7 @@ err_out:
220 return err; 220 return err;
221} 221}
222 222
223static struct pci_device_id s3d_pci_table[] = { 223static const struct pci_device_id s3d_pci_table[] = {
224 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002c), }, 224 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002c), },
225 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002d), }, 225 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002d), },
226 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002e), }, 226 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002e), },
diff --git a/drivers/video/fbdev/sunxvr500.c b/drivers/video/fbdev/sunxvr500.c
index dc0d886e4e7e..bc595937df08 100644
--- a/drivers/video/fbdev/sunxvr500.c
+++ b/drivers/video/fbdev/sunxvr500.c
@@ -393,7 +393,7 @@ err_out:
393 return err; 393 return err;
394} 394}
395 395
396static struct pci_device_id e3d_pci_table[] = { 396static const struct pci_device_id e3d_pci_table[] = {
397 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a0), }, 397 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a0), },
398 { PCI_DEVICE(0x1091, 0x7a0), }, 398 { PCI_DEVICE(0x1091, 0x7a0), },
399 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a2), }, 399 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a2), },
diff --git a/drivers/video/fbdev/tcx.c b/drivers/video/fbdev/tcx.c
index 54ad08854c94..c98d8a569ccd 100644
--- a/drivers/video/fbdev/tcx.c
+++ b/drivers/video/fbdev/tcx.c
@@ -467,8 +467,8 @@ static int tcx_probe(struct platform_device *op)
467 467
468 dev_set_drvdata(&op->dev, info); 468 dev_set_drvdata(&op->dev, info);
469 469
470 printk(KERN_INFO "%s: TCX at %lx:%lx, %s\n", 470 printk(KERN_INFO "%pOF: TCX at %lx:%lx, %s\n",
471 dp->full_name, 471 dp,
472 par->which_io, 472 par->which_io,
473 info->fix.smem_start, 473 info->fix.smem_start,
474 par->lowdepth ? "8-bit only" : "24-bit depth"); 474 par->lowdepth ? "8-bit only" : "24-bit depth");
diff --git a/drivers/video/fbdev/tdfxfb.c b/drivers/video/fbdev/tdfxfb.c
index d5fa313806fe..dec1fed9880e 100644
--- a/drivers/video/fbdev/tdfxfb.c
+++ b/drivers/video/fbdev/tdfxfb.c
@@ -120,7 +120,7 @@ static const struct fb_var_screeninfo tdfx_var = {
120static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id); 120static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id);
121static void tdfxfb_remove(struct pci_dev *pdev); 121static void tdfxfb_remove(struct pci_dev *pdev);
122 122
123static struct pci_device_id tdfxfb_id_table[] = { 123static const struct pci_device_id tdfxfb_id_table[] = {
124 { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE, 124 { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE,
125 PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16, 125 PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
126 0xff0000, 0 }, 126 0xff0000, 0 },
diff --git a/drivers/video/fbdev/tridentfb.c b/drivers/video/fbdev/tridentfb.c
index 8a5bbc13082e..284706184b1b 100644
--- a/drivers/video/fbdev/tridentfb.c
+++ b/drivers/video/fbdev/tridentfb.c
@@ -1737,7 +1737,7 @@ static void trident_pci_remove(struct pci_dev *dev)
1737} 1737}
1738 1738
1739/* List of boards that we are trying to support */ 1739/* List of boards that we are trying to support */
1740static struct pci_device_id trident_devices[] = { 1740static const struct pci_device_id trident_devices[] = {
1741 {PCI_VENDOR_ID_TRIDENT, BLADE3D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 1741 {PCI_VENDOR_ID_TRIDENT, BLADE3D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
1742 {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 1742 {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
1743 {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi7D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 1743 {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi7D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c
index 05ef657235df..ef08a104fb42 100644
--- a/drivers/video/fbdev/udlfb.c
+++ b/drivers/video/fbdev/udlfb.c
@@ -54,7 +54,7 @@ static const u32 udlfb_info_flags = FBINFO_DEFAULT | FBINFO_READS_FAST |
54 * which is compatible with all known USB 2.0 era graphics chips and firmware, 54 * which is compatible with all known USB 2.0 era graphics chips and firmware,
55 * but allows DisplayLink to increment those for any future incompatible chips 55 * but allows DisplayLink to increment those for any future incompatible chips
56 */ 56 */
57static struct usb_device_id id_table[] = { 57static const struct usb_device_id id_table[] = {
58 {.idVendor = 0x17e9, 58 {.idVendor = 0x17e9,
59 .bInterfaceClass = 0xff, 59 .bInterfaceClass = 0xff,
60 .bInterfaceSubClass = 0x00, 60 .bInterfaceSubClass = 0x00,
@@ -1465,7 +1465,7 @@ static ssize_t metrics_reset_store(struct device *fbdev,
1465 return count; 1465 return count;
1466} 1466}
1467 1467
1468static struct bin_attribute edid_attr = { 1468static const struct bin_attribute edid_attr = {
1469 .attr.name = "edid", 1469 .attr.name = "edid",
1470 .attr.mode = 0666, 1470 .attr.mode = 0666,
1471 .size = EDID_LENGTH, 1471 .size = EDID_LENGTH,
@@ -1655,7 +1655,6 @@ static int dlfb_usb_probe(struct usb_interface *interface,
1655error: 1655error:
1656 if (dev) { 1656 if (dev) {
1657 1657
1658 kref_put(&dev->kref, dlfb_free); /* ref for framebuffer */
1659 kref_put(&dev->kref, dlfb_free); /* last ref from kref_init */ 1658 kref_put(&dev->kref, dlfb_free); /* last ref from kref_init */
1660 1659
1661 /* dev has been deallocated. Do not dereference */ 1660 /* dev has been deallocated. Do not dereference */
diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c
index 6f8c0b9fc558..73676eb0244a 100644
--- a/drivers/video/fbdev/uvesafb.c
+++ b/drivers/video/fbdev/uvesafb.c
@@ -1666,7 +1666,7 @@ static struct attribute *uvesafb_dev_attrs[] = {
1666 NULL, 1666 NULL,
1667}; 1667};
1668 1668
1669static struct attribute_group uvesafb_dev_attgrp = { 1669static const struct attribute_group uvesafb_dev_attgrp = {
1670 .name = NULL, 1670 .name = NULL,
1671 .attrs = uvesafb_dev_attrs, 1671 .attrs = uvesafb_dev_attrs,
1672}; 1672};
diff --git a/drivers/video/fbdev/vermilion/vermilion.c b/drivers/video/fbdev/vermilion/vermilion.c
index ce4c4729a5e8..6f8d444eb0e3 100644
--- a/drivers/video/fbdev/vermilion/vermilion.c
+++ b/drivers/video/fbdev/vermilion/vermilion.c
@@ -55,7 +55,7 @@ static struct list_head global_has_mode;
55static struct fb_ops vmlfb_ops; 55static struct fb_ops vmlfb_ops;
56static struct vml_sys *subsys = NULL; 56static struct vml_sys *subsys = NULL;
57static char *vml_default_mode = "1024x768@60"; 57static char *vml_default_mode = "1024x768@60";
58static struct fb_videomode defaultmode = { 58static const struct fb_videomode defaultmode = {
59 NULL, 60, 1024, 768, 12896, 144, 24, 29, 3, 136, 6, 59 NULL, 60, 1024, 768, 12896, 144, 24, 29, 3, 136, 6,
60 0, FB_VMODE_NONINTERLACED 60 0, FB_VMODE_NONINTERLACED
61}; 61};
@@ -1044,7 +1044,7 @@ static struct fb_ops vmlfb_ops = {
1044 .fb_setcolreg = vmlfb_setcolreg 1044 .fb_setcolreg = vmlfb_setcolreg
1045}; 1045};
1046 1046
1047static struct pci_device_id vml_ids[] = { 1047static const struct pci_device_id vml_ids[] = {
1048 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, VML_DEVICE_VDC)}, 1048 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, VML_DEVICE_VDC)},
1049 {0} 1049 {0}
1050}; 1050};
diff --git a/drivers/video/fbdev/via/via-core.c b/drivers/video/fbdev/via/via-core.c
index 1d28e16888e9..77774d8abf94 100644
--- a/drivers/video/fbdev/via/via-core.c
+++ b/drivers/video/fbdev/via/via-core.c
@@ -724,7 +724,7 @@ static void via_pci_remove(struct pci_dev *pdev)
724} 724}
725 725
726 726
727static struct pci_device_id via_pci_table[] = { 727static const struct pci_device_id via_pci_table[] = {
728 { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_CLE266_DID), 728 { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_CLE266_DID),
729 .driver_data = UNICHROME_CLE266 }, 729 .driver_data = UNICHROME_CLE266 },
730 { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_K400_DID), 730 { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_K400_DID),
diff --git a/drivers/video/fbdev/vt8623fb.c b/drivers/video/fbdev/vt8623fb.c
index dd0f18e42d3e..5cac871db3ee 100644
--- a/drivers/video/fbdev/vt8623fb.c
+++ b/drivers/video/fbdev/vt8623fb.c
@@ -81,7 +81,7 @@ static struct vga_regset vt8623_line_compare_regs[] = {{0x18, 0, 7}, {0x07, 4,
81static struct vga_regset vt8623_fetch_count_regs[] = {{0x1C, 0, 7}, {0x1D, 0, 1}, VGA_REGSET_END}; 81static struct vga_regset vt8623_fetch_count_regs[] = {{0x1C, 0, 7}, {0x1D, 0, 1}, VGA_REGSET_END};
82static struct vga_regset vt8623_start_address_regs[] = {{0x0d, 0, 7}, {0x0c, 0, 7}, {0x34, 0, 7}, {0x48, 0, 1}, VGA_REGSET_END}; 82static struct vga_regset vt8623_start_address_regs[] = {{0x0d, 0, 7}, {0x0c, 0, 7}, {0x34, 0, 7}, {0x48, 0, 1}, VGA_REGSET_END};
83 83
84static struct svga_timing_regs vt8623_timing_regs = { 84static const struct svga_timing_regs vt8623_timing_regs = {
85 vt8623_h_total_regs, vt8623_h_display_regs, vt8623_h_blank_start_regs, 85 vt8623_h_total_regs, vt8623_h_display_regs, vt8623_h_blank_start_regs,
86 vt8623_h_blank_end_regs, vt8623_h_sync_start_regs, vt8623_h_sync_end_regs, 86 vt8623_h_blank_end_regs, vt8623_h_sync_start_regs, vt8623_h_sync_end_regs,
87 vt8623_v_total_regs, vt8623_v_display_regs, vt8623_v_blank_start_regs, 87 vt8623_v_total_regs, vt8623_v_display_regs, vt8623_v_blank_start_regs,
@@ -888,7 +888,7 @@ fail:
888 888
889/* List of boards that we are trying to support */ 889/* List of boards that we are trying to support */
890 890
891static struct pci_device_id vt8623_devices[] = { 891static const struct pci_device_id vt8623_devices[] = {
892 {PCI_DEVICE(PCI_VENDOR_ID_VIA, 0x3122)}, 892 {PCI_DEVICE(PCI_VENDOR_ID_VIA, 0x3122)},
893 {0, 0, 0, 0, 0, 0, 0} 893 {0, 0, 0, 0, 0, 0, 0}
894}; 894};
diff --git a/drivers/video/fbdev/xilinxfb.c b/drivers/video/fbdev/xilinxfb.c
index 17dc119c7a98..8628829b470d 100644
--- a/drivers/video/fbdev/xilinxfb.c
+++ b/drivers/video/fbdev/xilinxfb.c
@@ -41,7 +41,6 @@
41 41
42#define DRIVER_NAME "xilinxfb" 42#define DRIVER_NAME "xilinxfb"
43 43
44
45/* 44/*
46 * Xilinx calls it "TFT LCD Controller" though it can also be used for 45 * Xilinx calls it "TFT LCD Controller" though it can also be used for
47 * the VGA port on the Xilinx ML40x board. This is a hardware display 46 * the VGA port on the Xilinx ML40x board. This is a hardware display
@@ -92,15 +91,16 @@ struct xilinxfb_platform_data {
92 u32 xvirt, yvirt; /* resolution of memory buffer */ 91 u32 xvirt, yvirt; /* resolution of memory buffer */
93 92
94 /* Physical address of framebuffer memory; If non-zero, driver 93 /* Physical address of framebuffer memory; If non-zero, driver
95 * will use provided memory address instead of allocating one from 94 * will use provided memory address instead of allocating one from
96 * the consistent pool. */ 95 * the consistent pool.
96 */
97 u32 fb_phys; 97 u32 fb_phys;
98}; 98};
99 99
100/* 100/*
101 * Default xilinxfb configuration 101 * Default xilinxfb configuration
102 */ 102 */
103static struct xilinxfb_platform_data xilinx_fb_default_pdata = { 103static const struct xilinxfb_platform_data xilinx_fb_default_pdata = {
104 .xres = 640, 104 .xres = 640,
105 .yres = 480, 105 .yres = 480,
106 .xvirt = 1024, 106 .xvirt = 1024,
@@ -110,14 +110,14 @@ static struct xilinxfb_platform_data xilinx_fb_default_pdata = {
110/* 110/*
111 * Here are the default fb_fix_screeninfo and fb_var_screeninfo structures 111 * Here are the default fb_fix_screeninfo and fb_var_screeninfo structures
112 */ 112 */
113static struct fb_fix_screeninfo xilinx_fb_fix = { 113static const struct fb_fix_screeninfo xilinx_fb_fix = {
114 .id = "Xilinx", 114 .id = "Xilinx",
115 .type = FB_TYPE_PACKED_PIXELS, 115 .type = FB_TYPE_PACKED_PIXELS,
116 .visual = FB_VISUAL_TRUECOLOR, 116 .visual = FB_VISUAL_TRUECOLOR,
117 .accel = FB_ACCEL_NONE 117 .accel = FB_ACCEL_NONE
118}; 118};
119 119
120static struct fb_var_screeninfo xilinx_fb_var = { 120static const struct fb_var_screeninfo xilinx_fb_var = {
121 .bits_per_pixel = BITS_PER_PIXEL, 121 .bits_per_pixel = BITS_PER_PIXEL,
122 122
123 .red = { RED_SHIFT, 8, 0 }, 123 .red = { RED_SHIFT, 8, 0 },
@@ -128,18 +128,18 @@ static struct fb_var_screeninfo xilinx_fb_var = {
128 .activate = FB_ACTIVATE_NOW 128 .activate = FB_ACTIVATE_NOW
129}; 129};
130 130
131
132#define BUS_ACCESS_FLAG 0x1 /* 1 = BUS, 0 = DCR */ 131#define BUS_ACCESS_FLAG 0x1 /* 1 = BUS, 0 = DCR */
133#define LITTLE_ENDIAN_ACCESS 0x2 /* LITTLE ENDIAN IO functions */ 132#define LITTLE_ENDIAN_ACCESS 0x2 /* LITTLE ENDIAN IO functions */
134 133
135struct xilinxfb_drvdata { 134struct xilinxfb_drvdata {
136
137 struct fb_info info; /* FB driver info record */ 135 struct fb_info info; /* FB driver info record */
138 136
139 phys_addr_t regs_phys; /* phys. address of the control 137 phys_addr_t regs_phys; /* phys. address of the control
140 registers */ 138 * registers
139 */
141 void __iomem *regs; /* virt. address of the control 140 void __iomem *regs; /* virt. address of the control
142 registers */ 141 * registers
142 */
143#ifdef CONFIG_PPC_DCR 143#ifdef CONFIG_PPC_DCR
144 dcr_host_t dcr_host; 144 dcr_host_t dcr_host;
145 unsigned int dcr_len; 145 unsigned int dcr_len;
@@ -148,7 +148,7 @@ struct xilinxfb_drvdata {
148 dma_addr_t fb_phys; /* phys. address of the frame buffer */ 148 dma_addr_t fb_phys; /* phys. address of the frame buffer */
149 int fb_alloced; /* Flag, was the fb memory alloced? */ 149 int fb_alloced; /* Flag, was the fb memory alloced? */
150 150
151 u8 flags; /* features of the driver */ 151 u8 flags; /* features of the driver */
152 152
153 u32 reg_ctrl_default; 153 u32 reg_ctrl_default;
154 154
@@ -165,7 +165,7 @@ struct xilinxfb_drvdata {
165 * which bus its connected and call the appropriate write API. 165 * which bus its connected and call the appropriate write API.
166 */ 166 */
167static void xilinx_fb_out32(struct xilinxfb_drvdata *drvdata, u32 offset, 167static void xilinx_fb_out32(struct xilinxfb_drvdata *drvdata, u32 offset,
168 u32 val) 168 u32 val)
169{ 169{
170 if (drvdata->flags & BUS_ACCESS_FLAG) { 170 if (drvdata->flags & BUS_ACCESS_FLAG) {
171 if (drvdata->flags & LITTLE_ENDIAN_ACCESS) 171 if (drvdata->flags & LITTLE_ENDIAN_ACCESS)
@@ -195,8 +195,8 @@ static u32 xilinx_fb_in32(struct xilinxfb_drvdata *drvdata, u32 offset)
195} 195}
196 196
197static int 197static int
198xilinx_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, 198xilinx_fb_setcolreg(unsigned int regno, unsigned int red, unsigned int green,
199 unsigned transp, struct fb_info *fbi) 199 unsigned int blue, unsigned int transp, struct fb_info *fbi)
200{ 200{
201 u32 *palette = fbi->pseudo_palette; 201 u32 *palette = fbi->pseudo_palette;
202 202
@@ -205,9 +205,11 @@ xilinx_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue,
205 205
206 if (fbi->var.grayscale) { 206 if (fbi->var.grayscale) {
207 /* Convert color to grayscale. 207 /* Convert color to grayscale.
208 * grayscale = 0.30*R + 0.59*G + 0.11*B */ 208 * grayscale = 0.30*R + 0.59*G + 0.11*B
209 red = green = blue = 209 */
210 (red * 77 + green * 151 + blue * 28 + 127) >> 8; 210 blue = (red * 77 + green * 151 + blue * 28 + 127) >> 8;
211 green = blue;
212 red = green;
211 } 213 }
212 214
213 /* fbi->fix.visual is always FB_VISUAL_TRUECOLOR */ 215 /* fbi->fix.visual is always FB_VISUAL_TRUECOLOR */
@@ -241,13 +243,11 @@ xilinx_fb_blank(int blank_mode, struct fb_info *fbi)
241 xilinx_fb_out32(drvdata, REG_CTRL, 0); 243 xilinx_fb_out32(drvdata, REG_CTRL, 0);
242 default: 244 default:
243 break; 245 break;
244
245 } 246 }
246 return 0; /* success */ 247 return 0; /* success */
247} 248}
248 249
249static struct fb_ops xilinxfb_ops = 250static struct fb_ops xilinxfb_ops = {
250{
251 .owner = THIS_MODULE, 251 .owner = THIS_MODULE,
252 .fb_setcolreg = xilinx_fb_setcolreg, 252 .fb_setcolreg = xilinx_fb_setcolreg,
253 .fb_blank = xilinx_fb_blank, 253 .fb_blank = xilinx_fb_blank,
@@ -286,7 +286,8 @@ static int xilinxfb_assign(struct platform_device *pdev,
286 } else { 286 } else {
287 drvdata->fb_alloced = 1; 287 drvdata->fb_alloced = 1;
288 drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(fbsize), 288 drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(fbsize),
289 &drvdata->fb_phys, GFP_KERNEL); 289 &drvdata->fb_phys,
290 GFP_KERNEL);
290 } 291 }
291 292
292 if (!drvdata->fb_virt) { 293 if (!drvdata->fb_virt) {
@@ -300,7 +301,7 @@ static int xilinxfb_assign(struct platform_device *pdev,
300 /* Tell the hardware where the frame buffer is */ 301 /* Tell the hardware where the frame buffer is */
301 xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys); 302 xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys);
302 rc = xilinx_fb_in32(drvdata, REG_FB_ADDR); 303 rc = xilinx_fb_in32(drvdata, REG_FB_ADDR);
303 /* Endianess detection */ 304 /* Endianness detection */
304 if (rc != drvdata->fb_phys) { 305 if (rc != drvdata->fb_phys) {
305 drvdata->flags |= LITTLE_ENDIAN_ACCESS; 306 drvdata->flags |= LITTLE_ENDIAN_ACCESS;
306 xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys); 307 xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys);
@@ -310,8 +311,7 @@ static int xilinxfb_assign(struct platform_device *pdev,
310 drvdata->reg_ctrl_default = REG_CTRL_ENABLE; 311 drvdata->reg_ctrl_default = REG_CTRL_ENABLE;
311 if (pdata->rotate_screen) 312 if (pdata->rotate_screen)
312 drvdata->reg_ctrl_default |= REG_CTRL_ROTATE; 313 drvdata->reg_ctrl_default |= REG_CTRL_ROTATE;
313 xilinx_fb_out32(drvdata, REG_CTRL, 314 xilinx_fb_out32(drvdata, REG_CTRL, drvdata->reg_ctrl_default);
314 drvdata->reg_ctrl_default);
315 315
316 /* Fill struct fb_info */ 316 /* Fill struct fb_info */
317 drvdata->info.device = dev; 317 drvdata->info.device = dev;
@@ -364,7 +364,7 @@ err_regfb:
364err_cmap: 364err_cmap:
365 if (drvdata->fb_alloced) 365 if (drvdata->fb_alloced)
366 dma_free_coherent(dev, PAGE_ALIGN(fbsize), drvdata->fb_virt, 366 dma_free_coherent(dev, PAGE_ALIGN(fbsize), drvdata->fb_virt,
367 drvdata->fb_phys); 367 drvdata->fb_phys);
368 else 368 else
369 iounmap(drvdata->fb_virt); 369 iounmap(drvdata->fb_virt);
370 370
@@ -435,12 +435,12 @@ static int xilinxfb_of_probe(struct platform_device *pdev)
435 * Fill the resource structure if its direct BUS interface 435 * Fill the resource structure if its direct BUS interface
436 * otherwise fill the dcr_host structure. 436 * otherwise fill the dcr_host structure.
437 */ 437 */
438 if (tft_access) { 438 if (tft_access)
439 drvdata->flags |= BUS_ACCESS_FLAG; 439 drvdata->flags |= BUS_ACCESS_FLAG;
440 }
441#ifdef CONFIG_PPC_DCR 440#ifdef CONFIG_PPC_DCR
442 else { 441 else {
443 int start; 442 int start;
443
444 start = dcr_resource_start(pdev->dev.of_node, 0); 444 start = dcr_resource_start(pdev->dev.of_node, 0);
445 drvdata->dcr_len = dcr_resource_len(pdev->dev.of_node, 0); 445 drvdata->dcr_len = dcr_resource_len(pdev->dev.of_node, 0);
446 drvdata->dcr_host = dcr_map(pdev->dev.of_node, start, drvdata->dcr_len); 446 drvdata->dcr_host = dcr_map(pdev->dev.of_node, start, drvdata->dcr_len);
@@ -452,19 +452,19 @@ static int xilinxfb_of_probe(struct platform_device *pdev)
452#endif 452#endif
453 453
454 prop = of_get_property(pdev->dev.of_node, "phys-size", &size); 454 prop = of_get_property(pdev->dev.of_node, "phys-size", &size);
455 if ((prop) && (size >= sizeof(u32)*2)) { 455 if ((prop) && (size >= sizeof(u32) * 2)) {
456 pdata.screen_width_mm = prop[0]; 456 pdata.screen_width_mm = prop[0];
457 pdata.screen_height_mm = prop[1]; 457 pdata.screen_height_mm = prop[1];
458 } 458 }
459 459
460 prop = of_get_property(pdev->dev.of_node, "resolution", &size); 460 prop = of_get_property(pdev->dev.of_node, "resolution", &size);
461 if ((prop) && (size >= sizeof(u32)*2)) { 461 if ((prop) && (size >= sizeof(u32) * 2)) {
462 pdata.xres = prop[0]; 462 pdata.xres = prop[0];
463 pdata.yres = prop[1]; 463 pdata.yres = prop[1];
464 } 464 }
465 465
466 prop = of_get_property(pdev->dev.of_node, "virtual-resolution", &size); 466 prop = of_get_property(pdev->dev.of_node, "virtual-resolution", &size);
467 if ((prop) && (size >= sizeof(u32)*2)) { 467 if ((prop) && (size >= sizeof(u32) * 2)) {
468 pdata.xvirt = prop[0]; 468 pdata.xvirt = prop[0];
469 pdata.yvirt = prop[1]; 469 pdata.yvirt = prop[1];
470 } 470 }
@@ -482,7 +482,7 @@ static int xilinxfb_of_remove(struct platform_device *op)
482} 482}
483 483
484/* Match table for of_platform binding */ 484/* Match table for of_platform binding */
485static struct of_device_id xilinxfb_of_match[] = { 485static const struct of_device_id xilinxfb_of_match[] = {
486 { .compatible = "xlnx,xps-tft-1.00.a", }, 486 { .compatible = "xlnx,xps-tft-1.00.a", },
487 { .compatible = "xlnx,xps-tft-2.00.a", }, 487 { .compatible = "xlnx,xps-tft-2.00.a", },
488 { .compatible = "xlnx,xps-tft-2.01.a", }, 488 { .compatible = "xlnx,xps-tft-2.01.a", },
diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index 32b0a7543433..8ce0a99bf17c 100644
--- a/drivers/video/of_display_timing.c
+++ b/drivers/video/of_display_timing.c
@@ -31,8 +31,7 @@ static int parse_timing_property(const struct device_node *np, const char *name,
31 31
32 prop = of_find_property(np, name, &length); 32 prop = of_find_property(np, name, &length);
33 if (!prop) { 33 if (!prop) {
34 pr_err("%s: could not find property %s\n", 34 pr_err("%pOF: could not find property %s\n", np, name);
35 of_node_full_name(np), name);
36 return -EINVAL; 35 return -EINVAL;
37 } 36 }
38 37
@@ -44,8 +43,7 @@ static int parse_timing_property(const struct device_node *np, const char *name,
44 } else if (cells == 3) { 43 } else if (cells == 3) {
45 ret = of_property_read_u32_array(np, name, &result->min, cells); 44 ret = of_property_read_u32_array(np, name, &result->min, cells);
46 } else { 45 } else {
47 pr_err("%s: illegal timing specification in %s\n", 46 pr_err("%pOF: illegal timing specification in %s\n", np, name);
48 of_node_full_name(np), name);
49 return -EINVAL; 47 return -EINVAL;
50 } 48 }
51 49
@@ -105,8 +103,7 @@ static int of_parse_display_timing(const struct device_node *np,
105 dt->flags |= DISPLAY_FLAGS_DOUBLECLK; 103 dt->flags |= DISPLAY_FLAGS_DOUBLECLK;
106 104
107 if (ret) { 105 if (ret) {
108 pr_err("%s: error reading timing properties\n", 106 pr_err("%pOF: error reading timing properties\n", np);
109 of_node_full_name(np));
110 return -EINVAL; 107 return -EINVAL;
111 } 108 }
112 109
@@ -129,8 +126,7 @@ int of_get_display_timing(const struct device_node *np, const char *name,
129 126
130 timing_np = of_get_child_by_name(np, name); 127 timing_np = of_get_child_by_name(np, name);
131 if (!timing_np) { 128 if (!timing_np) {
132 pr_err("%s: could not find node '%s'\n", 129 pr_err("%pOF: could not find node '%s'\n", np, name);
133 of_node_full_name(np), name);
134 return -ENOENT; 130 return -ENOENT;
135 } 131 }
136 132
@@ -154,15 +150,13 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
154 150
155 timings_np = of_get_child_by_name(np, "display-timings"); 151 timings_np = of_get_child_by_name(np, "display-timings");
156 if (!timings_np) { 152 if (!timings_np) {
157 pr_err("%s: could not find display-timings node\n", 153 pr_err("%pOF: could not find display-timings node\n", np);
158 of_node_full_name(np));
159 return NULL; 154 return NULL;
160 } 155 }
161 156
162 disp = kzalloc(sizeof(*disp), GFP_KERNEL); 157 disp = kzalloc(sizeof(*disp), GFP_KERNEL);
163 if (!disp) { 158 if (!disp) {
164 pr_err("%s: could not allocate struct disp'\n", 159 pr_err("%pOF: could not allocate struct disp'\n", np);
165 of_node_full_name(np));
166 goto dispfail; 160 goto dispfail;
167 } 161 }
168 162
@@ -172,28 +166,25 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
172 entry = of_get_next_child(timings_np, NULL); 166 entry = of_get_next_child(timings_np, NULL);
173 /* if there is no child, it is useless to go on */ 167 /* if there is no child, it is useless to go on */
174 if (!entry) { 168 if (!entry) {
175 pr_err("%s: no timing specifications given\n", 169 pr_err("%pOF: no timing specifications given\n", np);
176 of_node_full_name(np));
177 goto entryfail; 170 goto entryfail;
178 } 171 }
179 172
180 pr_debug("%s: using %s as default timing\n", 173 pr_debug("%pOF: using %s as default timing\n", np, entry->name);
181 of_node_full_name(np), entry->name);
182 174
183 native_mode = entry; 175 native_mode = entry;
184 176
185 disp->num_timings = of_get_child_count(timings_np); 177 disp->num_timings = of_get_child_count(timings_np);
186 if (disp->num_timings == 0) { 178 if (disp->num_timings == 0) {
187 /* should never happen, as entry was already found above */ 179 /* should never happen, as entry was already found above */
188 pr_err("%s: no timings specified\n", of_node_full_name(np)); 180 pr_err("%pOF: no timings specified\n", np);
189 goto entryfail; 181 goto entryfail;
190 } 182 }
191 183
192 disp->timings = kzalloc(sizeof(struct display_timing *) * 184 disp->timings = kzalloc(sizeof(struct display_timing *) *
193 disp->num_timings, GFP_KERNEL); 185 disp->num_timings, GFP_KERNEL);
194 if (!disp->timings) { 186 if (!disp->timings) {
195 pr_err("%s: could not allocate timings array\n", 187 pr_err("%pOF: could not allocate timings array\n", np);
196 of_node_full_name(np));
197 goto entryfail; 188 goto entryfail;
198 } 189 }
199 190
@@ -206,8 +197,8 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
206 197
207 dt = kzalloc(sizeof(*dt), GFP_KERNEL); 198 dt = kzalloc(sizeof(*dt), GFP_KERNEL);
208 if (!dt) { 199 if (!dt) {
209 pr_err("%s: could not allocate display_timing struct\n", 200 pr_err("%pOF: could not allocate display_timing struct\n",
210 of_node_full_name(np)); 201 np);
211 goto timingfail; 202 goto timingfail;
212 } 203 }
213 204
@@ -217,8 +208,8 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
217 * to not encourage wrong devicetrees, fail in case of 208 * to not encourage wrong devicetrees, fail in case of
218 * an error 209 * an error
219 */ 210 */
220 pr_err("%s: error in timing %d\n", 211 pr_err("%pOF: error in timing %d\n",
221 of_node_full_name(np), disp->num_timings + 1); 212 np, disp->num_timings + 1);
222 kfree(dt); 213 kfree(dt);
223 goto timingfail; 214 goto timingfail;
224 } 215 }
@@ -236,8 +227,8 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
236 */ 227 */
237 of_node_put(native_mode); 228 of_node_put(native_mode);
238 229
239 pr_debug("%s: got %d timings. Using timing #%d as default\n", 230 pr_debug("%pOF: got %d timings. Using timing #%d as default\n",
240 of_node_full_name(np), disp->num_timings, 231 np, disp->num_timings,
241 disp->native_mode + 1); 232 disp->native_mode + 1);
242 233
243 return disp; 234 return disp;
diff --git a/drivers/video/of_videomode.c b/drivers/video/of_videomode.c
index b5102aa6090d..9b5f9de88fec 100644
--- a/drivers/video/of_videomode.c
+++ b/drivers/video/of_videomode.c
@@ -36,7 +36,7 @@ int of_get_videomode(struct device_node *np, struct videomode *vm,
36 36
37 disp = of_get_display_timings(np); 37 disp = of_get_display_timings(np);
38 if (!disp) { 38 if (!disp) {
39 pr_err("%s: no timings specified\n", of_node_full_name(np)); 39 pr_err("%pOF: no timings specified\n", np);
40 return -EINVAL; 40 return -EINVAL;
41 } 41 }
42 42
diff --git a/include/linux/fb.h b/include/linux/fb.h
index a964d076b4dc..f4386b0ccf40 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -400,7 +400,7 @@ struct fb_tile_ops {
400#endif /* CONFIG_FB_TILEBLITTING */ 400#endif /* CONFIG_FB_TILEBLITTING */
401 401
402/* FBINFO_* = fb_info.flags bit flags */ 402/* FBINFO_* = fb_info.flags bit flags */
403#define FBINFO_MODULE 0x0001 /* Low-level driver is a module */ 403#define FBINFO_DEFAULT 0
404#define FBINFO_HWACCEL_DISABLED 0x0002 404#define FBINFO_HWACCEL_DISABLED 0x0002
405 /* When FBINFO_HWACCEL_DISABLED is set: 405 /* When FBINFO_HWACCEL_DISABLED is set:
406 * Hardware acceleration is turned off. Software implementations 406 * Hardware acceleration is turned off. Software implementations
@@ -533,14 +533,6 @@ static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
533 return a; 533 return a;
534} 534}
535 535
536#ifdef MODULE
537#define FBINFO_DEFAULT FBINFO_MODULE
538#else
539#define FBINFO_DEFAULT 0
540#endif
541
542// This will go away
543#define FBINFO_FLAG_MODULE FBINFO_MODULE
544#define FBINFO_FLAG_DEFAULT FBINFO_DEFAULT 536#define FBINFO_FLAG_DEFAULT FBINFO_DEFAULT
545 537
546/* This will go away 538/* This will go away
diff --git a/include/linux/fbcon.h b/include/linux/fbcon.h
new file mode 100644
index 000000000000..f68a7db14165
--- /dev/null
+++ b/include/linux/fbcon.h
@@ -0,0 +1,12 @@
1#ifndef _LINUX_FBCON_H
2#define _LINUX_FBCON_H
3
4#ifdef CONFIG_FRAMEBUFFER_CONSOLE
5void __init fb_console_init(void);
6void __exit fb_console_exit(void);
7#else
8static inline void fb_console_init(void) {}
9static inline void fb_console_exit(void) {}
10#endif
11
12#endif /* _LINUX_FBCON_H */