浏览代码

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.
  ...
Linus Torvalds 8 年之前
父节点
当前提交
503f04530f
共有 94 个文件被更改,包括 398 次插入269 次删除
  1. 7 0
      Documentation/fb/fbcon.txt
  2. 1 1
      drivers/video/console/Kconfig
  3. 0 8
      drivers/video/console/Makefile
  4. 2 3
      drivers/video/console/vgacon.c
  5. 1 1
      drivers/video/fbdev/68328fb.c
  6. 1 1
      drivers/video/fbdev/Kconfig
  7. 1 1
      drivers/video/fbdev/amba-clcd.c
  8. 1 1
      drivers/video/fbdev/arkfb.c
  9. 1 1
      drivers/video/fbdev/asiliantfb.c
  10. 1 1
      drivers/video/fbdev/atmel_lcdfb.c
  11. 2 2
      drivers/video/fbdev/aty/aty128fb.c
  12. 3 3
      drivers/video/fbdev/aty/atyfb_base.c
  13. 3 3
      drivers/video/fbdev/aty/radeon_base.c
  14. 1 1
      drivers/video/fbdev/bfin-lq035q1-fb.c
  15. 2 2
      drivers/video/fbdev/bw2.c
  16. 2 2
      drivers/video/fbdev/cg14.c
  17. 2 2
      drivers/video/fbdev/cg3.c
  18. 2 2
      drivers/video/fbdev/cg6.c
  19. 2 2
      drivers/video/fbdev/chipsfb.c
  20. 1 1
      drivers/video/fbdev/cobalt_lcdfb.c
  21. 14 0
      drivers/video/fbdev/core/Makefile
  22. 2 6
      drivers/video/fbdev/core/bitblit.c
  23. 22 15
      drivers/video/fbdev/core/fbcon.c
  24. 7 2
      drivers/video/fbdev/core/fbcon.h
  25. 2 6
      drivers/video/fbdev/core/fbcon_ccw.c
  26. 2 6
      drivers/video/fbdev/core/fbcon_cw.c
  27. 145 0
      drivers/video/fbdev/core/fbcon_dmi_quirks.c
  28. 0 4
      drivers/video/fbdev/core/fbcon_rotate.c
  29. 0 0
      drivers/video/fbdev/core/fbcon_rotate.h
  30. 2 6
      drivers/video/fbdev/core/fbcon_ud.c
  31. 9 3
      drivers/video/fbdev/core/fbmem.c
  32. 2 2
      drivers/video/fbdev/core/fbmon.c
  33. 0 4
      drivers/video/fbdev/core/softcursor.c
  34. 1 6
      drivers/video/fbdev/core/tileblit.c
  35. 1 1
      drivers/video/fbdev/cyber2000fb.c
  36. 1 1
      drivers/video/fbdev/da8xx-fb.c
  37. 1 1
      drivers/video/fbdev/dnfb.c
  38. 1 1
      drivers/video/fbdev/fb-puv3.c
  39. 2 2
      drivers/video/fbdev/ffb.c
  40. 1 1
      drivers/video/fbdev/fm2fb.c
  41. 1 1
      drivers/video/fbdev/geode/gxfb_core.c
  42. 1 1
      drivers/video/fbdev/grvga.c
  43. 2 2
      drivers/video/fbdev/i810/i810_main.c
  44. 1 1
      drivers/video/fbdev/imsttfb.c
  45. 1 1
      drivers/video/fbdev/intelfb/intelfbdrv.c
  46. 1 1
      drivers/video/fbdev/kyro/fbdev.c
  47. 2 2
      drivers/video/fbdev/leo.c
  48. 6 8
      drivers/video/fbdev/matrox/matroxfb_base.c
  49. 1 1
      drivers/video/fbdev/maxinefb.c
  50. 1 1
      drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
  51. 2 2
      drivers/video/fbdev/mbx/mbxfb.c
  52. 1 1
      drivers/video/fbdev/neofb.c
  53. 1 1
      drivers/video/fbdev/nvidia/nvidia.c
  54. 4 6
      drivers/video/fbdev/offb.c
  55. 1 1
      drivers/video/fbdev/omap/lcd_mipid.c
  56. 1 1
      drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c
  57. 1 1
      drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c
  58. 1 1
      drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c
  59. 1 1
      drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
  60. 2 1
      drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
  61. 2 2
      drivers/video/fbdev/p9100.c
  62. 1 1
      drivers/video/fbdev/pm2fb.c
  63. 1 1
      drivers/video/fbdev/pm3fb.c
  64. 2 2
      drivers/video/fbdev/pmag-aa-fb.c
  65. 2 2
      drivers/video/fbdev/pmag-ba-fb.c
  66. 2 2
      drivers/video/fbdev/pmagb-b-fb.c
  67. 1 1
      drivers/video/fbdev/ps3fb.c
  68. 2 2
      drivers/video/fbdev/pvr2fb.c
  69. 2 2
      drivers/video/fbdev/pxa3xx-gcu.c
  70. 1 1
      drivers/video/fbdev/q40fb.c
  71. 1 1
      drivers/video/fbdev/riva/fbdev.c
  72. 1 1
      drivers/video/fbdev/s3fb.c
  73. 1 1
      drivers/video/fbdev/savage/savagefb_driver.c
  74. 3 12
      drivers/video/fbdev/sis/init301.c
  75. 2 2
      drivers/video/fbdev/skeletonfb.c
  76. 1 1
      drivers/video/fbdev/sm501fb.c
  77. 9 8
      drivers/video/fbdev/sm712fb.c
  78. 1 1
      drivers/video/fbdev/smscufx.c
  79. 5 5
      drivers/video/fbdev/sunxvr1000.c
  80. 1 1
      drivers/video/fbdev/sunxvr2500.c
  81. 1 1
      drivers/video/fbdev/sunxvr500.c
  82. 2 2
      drivers/video/fbdev/tcx.c
  83. 1 1
      drivers/video/fbdev/tdfxfb.c
  84. 1 1
      drivers/video/fbdev/tridentfb.c
  85. 2 3
      drivers/video/fbdev/udlfb.c
  86. 1 1
      drivers/video/fbdev/uvesafb.c
  87. 2 2
      drivers/video/fbdev/vermilion/vermilion.c
  88. 1 1
      drivers/video/fbdev/via/via-core.c
  89. 2 2
      drivers/video/fbdev/vt8623fb.c
  90. 31 31
      drivers/video/fbdev/xilinxfb.c
  91. 16 25
      drivers/video/of_display_timing.c
  92. 1 1
      drivers/video/of_videomode.c
  93. 1 9
      include/linux/fb.h
  94. 12 0
      include/linux/fbcon.h

+ 7 - 0
Documentation/fb/fbcon.txt

@@ -148,6 +148,13 @@ C. Boot options
 	Actually, the underlying fb driver is totally ignorant of console
 	Actually, the underlying fb driver is totally ignorant of console
 	rotation.
 	rotation.
 
 
+5. fbcon=margin:<color>
+
+	This option specifies the color of the margins. The margins are the
+	leftover area at the right and the bottom of the screen that are not
+	used by text. By default, this area will be black. The 'color' value
+	is an integer number that depends on the framebuffer driver being used.
+
 C. Attaching, Detaching and Unloading
 C. Attaching, Detaching and Unloading
 
 
 Before going on how to attach, detach and unload the framebuffer console, an
 Before going on how to attach, detach and unload the framebuffer console, an

+ 1 - 1
drivers/video/console/Kconfig

@@ -117,7 +117,7 @@ config DUMMY_CONSOLE_ROWS
           Select 25 if you use a 640x480 resolution by default.
           Select 25 if you use a 640x480 resolution by default.
 
 
 config FRAMEBUFFER_CONSOLE
 config FRAMEBUFFER_CONSOLE
-	tristate "Framebuffer Console support"
+	bool "Framebuffer Console support"
 	depends on FB && !UML
 	depends on FB && !UML
 	select VT_HW_CONSOLE_BINDING
 	select VT_HW_CONSOLE_BINDING
 	select CRC32
 	select CRC32

+ 0 - 8
drivers/video/console/Makefile

@@ -7,13 +7,5 @@ obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o
 obj-$(CONFIG_STI_CONSOLE)         += sticon.o sticore.o
 obj-$(CONFIG_STI_CONSOLE)         += sticon.o sticore.o
 obj-$(CONFIG_VGA_CONSOLE)         += vgacon.o
 obj-$(CONFIG_VGA_CONSOLE)         += vgacon.o
 obj-$(CONFIG_MDA_CONSOLE)         += mdacon.o
 obj-$(CONFIG_MDA_CONSOLE)         += mdacon.o
-obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o bitblit.o softcursor.o
-ifeq ($(CONFIG_FB_TILEBLITTING),y)
-obj-$(CONFIG_FRAMEBUFFER_CONSOLE)     += tileblit.o
-endif
-ifeq ($(CONFIG_FRAMEBUFFER_CONSOLE_ROTATION),y)
-obj-$(CONFIG_FRAMEBUFFER_CONSOLE)     += fbcon_rotate.o fbcon_cw.o fbcon_ud.o \
-                                         fbcon_ccw.o
-endif
 
 
 obj-$(CONFIG_FB_STI)              += sticore.o
 obj-$(CONFIG_FB_STI)              += sticore.o

+ 2 - 3
drivers/video/console/vgacon.c

@@ -398,9 +398,8 @@ static const char *vgacon_startup(void)
 #endif
 #endif
 	}
 	}
 
 
-	/* boot_params.screen_info initialized? */
-	if ((screen_info.orig_video_mode  == 0) &&
-	    (screen_info.orig_video_lines == 0) &&
+	/* boot_params.screen_info reasonably initialized? */
+	if ((screen_info.orig_video_lines == 0) ||
 	    (screen_info.orig_video_cols  == 0))
 	    (screen_info.orig_video_cols  == 0))
 		goto no_vga;
 		goto no_vga;
 
 

+ 1 - 1
drivers/video/fbdev/68328fb.c

@@ -72,7 +72,7 @@ static struct fb_var_screeninfo mc68x328fb_default __initdata = {
       	.vmode =	FB_VMODE_NONINTERLACED,
       	.vmode =	FB_VMODE_NONINTERLACED,
 };
 };
 
 
-static struct fb_fix_screeninfo mc68x328fb_fix __initdata = {
+static const struct fb_fix_screeninfo mc68x328fb_fix __initconst = {
 	.id =		"68328fb",
 	.id =		"68328fb",
 	.type =		FB_TYPE_PACKED_PIXELS,
 	.type =		FB_TYPE_PACKED_PIXELS,
 	.xpanstep =	1,
 	.xpanstep =	1,

+ 1 - 1
drivers/video/fbdev/Kconfig

@@ -2173,7 +2173,7 @@ config FB_PS3_DEFAULT_SIZE_M
 
 
 config FB_XILINX
 config FB_XILINX
 	tristate "Xilinx frame buffer support"
 	tristate "Xilinx frame buffer support"
-	depends on FB && (XILINX_VIRTEX || MICROBLAZE || ARCH_ZYNQ)
+	depends on FB && (XILINX_VIRTEX || MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP)
 	select FB_CFB_FILLRECT
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
 	select FB_CFB_IMAGEBLIT

+ 1 - 1
drivers/video/fbdev/amba-clcd.c

@@ -1035,7 +1035,7 @@ static struct clcd_vendor_data vendor_nomadik = {
 	.init_panel = nomadik_clcd_init_panel,
 	.init_panel = nomadik_clcd_init_panel,
 };
 };
 
 
-static struct amba_id clcdfb_id_table[] = {
+static const struct amba_id clcdfb_id_table[] = {
 	{
 	{
 		.id	= 0x00041110,
 		.id	= 0x00041110,
 		.mask	= 0x000ffffe,
 		.mask	= 0x000ffffe,

+ 1 - 1
drivers/video/fbdev/arkfb.c

@@ -1157,7 +1157,7 @@ fail:
 
 
 /* List of boards that we are trying to support */
 /* List of boards that we are trying to support */
 
 
-static struct pci_device_id ark_devices[] = {
+static const struct pci_device_id ark_devices[] = {
 	{PCI_DEVICE(0xEDD8, 0xA099)},
 	{PCI_DEVICE(0xEDD8, 0xA099)},
 	{0, 0, 0, 0, 0, 0, 0}
 	{0, 0, 0, 0, 0, 0, 0}
 };
 };

+ 1 - 1
drivers/video/fbdev/asiliantfb.c

@@ -592,7 +592,7 @@ static void asiliantfb_remove(struct pci_dev *dp)
 	framebuffer_release(p);
 	framebuffer_release(p);
 }
 }
 
 
-static struct pci_device_id asiliantfb_pci_tbl[] = {
+static const struct pci_device_id asiliantfb_pci_tbl[] = {
 	{ PCI_VENDOR_ID_CT, PCI_DEVICE_ID_CT_69000, PCI_ANY_ID, PCI_ANY_ID },
 	{ PCI_VENDOR_ID_CT, PCI_DEVICE_ID_CT_69000, PCI_ANY_ID, PCI_ANY_ID },
 	{ 0 }
 	{ 0 }
 };
 };

+ 1 - 1
drivers/video/fbdev/atmel_lcdfb.c

@@ -320,7 +320,7 @@ static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int
 	}
 	}
 }
 }
 
 
-static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = {
+static const struct fb_fix_screeninfo atmel_lcdfb_fix __initconst = {
 	.type		= FB_TYPE_PACKED_PIXELS,
 	.type		= FB_TYPE_PACKED_PIXELS,
 	.visual		= FB_VISUAL_TRUECOLOR,
 	.visual		= FB_VISUAL_TRUECOLOR,
 	.xpanstep	= 0,
 	.xpanstep	= 0,

+ 2 - 2
drivers/video/fbdev/aty/aty128fb.c

@@ -116,7 +116,7 @@ static const struct fb_var_screeninfo default_var = {
 
 
 /* default modedb mode */
 /* default modedb mode */
 /* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */
 /* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */
-static struct fb_videomode defaultmode = {
+static const struct fb_videomode defaultmode = {
 	.refresh =	60,
 	.refresh =	60,
 	.xres =		640,
 	.xres =		640,
 	.yres =		480,
 	.yres =		480,
@@ -166,7 +166,7 @@ static int aty128_pci_resume(struct pci_dev *pdev);
 static int aty128_do_resume(struct pci_dev *pdev);
 static int aty128_do_resume(struct pci_dev *pdev);
 
 
 /* supported Rage128 chipsets */
 /* supported Rage128 chipsets */
-static struct pci_device_id aty128_pci_tbl[] = {
+static const struct pci_device_id aty128_pci_tbl[] = {
 	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LE,
 	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LE,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_M3_pci },
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_M3_pci },
 	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LF,
 	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LF,

+ 3 - 3
drivers/video/fbdev/aty/atyfb_base.c

@@ -274,7 +274,7 @@ static struct fb_var_screeninfo default_var = {
 	0, FB_VMODE_NONINTERLACED
 	0, FB_VMODE_NONINTERLACED
 };
 };
 
 
-static struct fb_videomode defmode = {
+static const struct fb_videomode defmode = {
 	/* 640x480 @ 60 Hz, 31.5 kHz hsync */
 	/* 640x480 @ 60 Hz, 31.5 kHz hsync */
 	NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
 	NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
 	0, FB_VMODE_NONINTERLACED
 	0, FB_VMODE_NONINTERLACED
@@ -1855,7 +1855,7 @@ static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
 #if defined(DEBUG) && defined(CONFIG_FB_ATY_CT)
 #if defined(DEBUG) && defined(CONFIG_FB_ATY_CT)
 	case ATYIO_CLKR:
 	case ATYIO_CLKR:
 		if (M64_HAS(INTEGRATED)) {
 		if (M64_HAS(INTEGRATED)) {
-			struct atyclk clk;
+			struct atyclk clk = { 0 };
 			union aty_pll *pll = &par->pll;
 			union aty_pll *pll = &par->pll;
 			u32 dsp_config = pll->ct.dsp_config;
 			u32 dsp_config = pll->ct.dsp_config;
 			u32 dsp_on_off = pll->ct.dsp_on_off;
 			u32 dsp_on_off = pll->ct.dsp_on_off;
@@ -3756,7 +3756,7 @@ static void atyfb_pci_remove(struct pci_dev *pdev)
 	atyfb_remove(info);
 	atyfb_remove(info);
 }
 }
 
 
-static struct pci_device_id atyfb_pci_tbl[] = {
+static const struct pci_device_id atyfb_pci_tbl[] = {
 #ifdef CONFIG_FB_ATY_GX
 #ifdef CONFIG_FB_ATY_GX
 	{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_CHIP_MACH64GX) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_CHIP_MACH64GX) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_CHIP_MACH64CX) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_CHIP_MACH64CX) },

+ 3 - 3
drivers/video/fbdev/aty/radeon_base.c

@@ -96,7 +96,7 @@
 #define CHIP_DEF(id, family, flags)					\
 #define CHIP_DEF(id, family, flags)					\
 	{ PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) }
 	{ PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) }
 
 
-static struct pci_device_id radeonfb_pci_table[] = {
+static const struct pci_device_id radeonfb_pci_table[] = {
         /* Radeon Xpress 200m */
         /* Radeon Xpress 200m */
 	CHIP_DEF(PCI_CHIP_RS480_5955,   RS480,  CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
 	CHIP_DEF(PCI_CHIP_RS480_5955,   RS480,  CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
 	CHIP_DEF(PCI_CHIP_RS482_5975,	RS480,	CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
 	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,
 	return radeon_show_one_edid(buf, off, count, rinfo->mon2_EDID);
 	return radeon_show_one_edid(buf, off, count, rinfo->mon2_EDID);
 }
 }
 
 
-static struct bin_attribute edid1_attr = {
+static const struct bin_attribute edid1_attr = {
 	.attr   = {
 	.attr   = {
 		.name	= "edid1",
 		.name	= "edid1",
 		.mode	= 0444,
 		.mode	= 0444,
@@ -2250,7 +2250,7 @@ static struct bin_attribute edid1_attr = {
 	.read	= radeon_show_edid1,
 	.read	= radeon_show_edid1,
 };
 };
 
 
-static struct bin_attribute edid2_attr = {
+static const struct bin_attribute edid2_attr = {
 	.attr   = {
 	.attr   = {
 		.name	= "edid2",
 		.name	= "edid2",
 		.mode	= 0444,
 		.mode	= 0444,

+ 1 - 1
drivers/video/fbdev/bfin-lq035q1-fb.c

@@ -841,7 +841,7 @@ static int bfin_lq035q1_resume(struct device *dev)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dev_pm_ops bfin_lq035q1_dev_pm_ops = {
+static const struct dev_pm_ops bfin_lq035q1_dev_pm_ops = {
 	.suspend = bfin_lq035q1_suspend,
 	.suspend = bfin_lq035q1_suspend,
 	.resume  = bfin_lq035q1_resume,
 	.resume  = bfin_lq035q1_resume,
 };
 };

+ 2 - 2
drivers/video/fbdev/bw2.c

@@ -333,8 +333,8 @@ static int bw2_probe(struct platform_device *op)
 
 
 	dev_set_drvdata(&op->dev, info);
 	dev_set_drvdata(&op->dev, info);
 
 
-	printk(KERN_INFO "%s: bwtwo at %lx:%lx\n",
-	       dp->full_name, par->which_io, info->fix.smem_start);
+	printk(KERN_INFO "%pOF: bwtwo at %lx:%lx\n",
+	       dp, par->which_io, info->fix.smem_start);
 
 
 	return 0;
 	return 0;
 
 

+ 2 - 2
drivers/video/fbdev/cg14.c

@@ -553,8 +553,8 @@ static int cg14_probe(struct platform_device *op)
 
 
 	dev_set_drvdata(&op->dev, info);
 	dev_set_drvdata(&op->dev, info);
 
 
-	printk(KERN_INFO "%s: cgfourteen at %lx:%lx, %dMB\n",
-	       dp->full_name,
+	printk(KERN_INFO "%pOF: cgfourteen at %lx:%lx, %dMB\n",
+	       dp,
 	       par->iospace, info->fix.smem_start,
 	       par->iospace, info->fix.smem_start,
 	       par->ramsize >> 20);
 	       par->ramsize >> 20);
 
 

+ 2 - 2
drivers/video/fbdev/cg3.c

@@ -412,8 +412,8 @@ static int cg3_probe(struct platform_device *op)
 
 
 	dev_set_drvdata(&op->dev, info);
 	dev_set_drvdata(&op->dev, info);
 
 
-	printk(KERN_INFO "%s: cg3 at %lx:%lx\n",
-	       dp->full_name, par->which_io, info->fix.smem_start);
+	printk(KERN_INFO "%pOF: cg3 at %lx:%lx\n",
+	       dp, par->which_io, info->fix.smem_start);
 
 
 	return 0;
 	return 0;
 
 

+ 2 - 2
drivers/video/fbdev/cg6.c

@@ -810,8 +810,8 @@ static int cg6_probe(struct platform_device *op)
 
 
 	dev_set_drvdata(&op->dev, info);
 	dev_set_drvdata(&op->dev, info);
 
 
-	printk(KERN_INFO "%s: CGsix [%s] at %lx:%lx\n",
-	       dp->full_name, info->fix.id,
+	printk(KERN_INFO "%pOF: CGsix [%s] at %lx:%lx\n",
+	       dp, info->fix.id,
 	       par->which_io, info->fix.smem_start);
 	       par->which_io, info->fix.smem_start);
 
 
 	return 0;
 	return 0;

+ 2 - 2
drivers/video/fbdev/chipsfb.c

@@ -292,7 +292,7 @@ static void chips_hw_init(void)
 		write_fr(chips_init_fr[i].addr, chips_init_fr[i].data);
 		write_fr(chips_init_fr[i].addr, chips_init_fr[i].data);
 }
 }
 
 
-static struct fb_fix_screeninfo chipsfb_fix = {
+static const struct fb_fix_screeninfo chipsfb_fix = {
 	.id =		"C&T 65550",
 	.id =		"C&T 65550",
 	.type =		FB_TYPE_PACKED_PIXELS,
 	.type =		FB_TYPE_PACKED_PIXELS,
 	.visual =	FB_VISUAL_PSEUDOCOLOR,
 	.visual =	FB_VISUAL_PSEUDOCOLOR,
@@ -309,7 +309,7 @@ static struct fb_fix_screeninfo chipsfb_fix = {
 	.smem_len =	0x100000,	/* 1MB */
 	.smem_len =	0x100000,	/* 1MB */
 };
 };
 
 
-static struct fb_var_screeninfo chipsfb_var = {
+static const struct fb_var_screeninfo chipsfb_var = {
 	.xres = 800,
 	.xres = 800,
 	.yres = 600,
 	.yres = 600,
 	.xres_virtual = 800,
 	.xres_virtual = 800,

+ 1 - 1
drivers/video/fbdev/cobalt_lcdfb.c

@@ -126,7 +126,7 @@ static void lcd_clear(struct fb_info *info)
 	lcd_write_control(info, LCD_RESET);
 	lcd_write_control(info, LCD_RESET);
 }
 }
 
 
-static struct fb_fix_screeninfo cobalt_lcdfb_fix = {
+static const struct fb_fix_screeninfo cobalt_lcdfb_fix = {
 	.id		= "cobalt-lcd",
 	.id		= "cobalt-lcd",
 	.type		= FB_TYPE_TEXT,
 	.type		= FB_TYPE_TEXT,
 	.type_aux	= FB_AUX_TEXT_MDA,
 	.type_aux	= FB_AUX_TEXT_MDA,

+ 14 - 0
drivers/video/fbdev/core/Makefile

@@ -4,6 +4,20 @@ obj-$(CONFIG_FB)                  += fb.o
 fb-y                              := fbmem.o fbmon.o fbcmap.o fbsysfs.o \
 fb-y                              := fbmem.o fbmon.o fbcmap.o fbsysfs.o \
                                      modedb.o fbcvt.o
                                      modedb.o fbcvt.o
 fb-$(CONFIG_FB_DEFERRED_IO)       += fb_defio.o
 fb-$(CONFIG_FB_DEFERRED_IO)       += fb_defio.o
+
+ifeq ($(CONFIG_FRAMEBUFFER_CONSOLE),y)
+fb-y				  += fbcon.o bitblit.o softcursor.o
+ifeq ($(CONFIG_FB_TILEBLITTING),y)
+fb-y				  += tileblit.o
+endif
+ifeq ($(CONFIG_FRAMEBUFFER_CONSOLE_ROTATION),y)
+fb-y				  += fbcon_rotate.o fbcon_cw.o fbcon_ud.o \
+				     fbcon_ccw.o
+endif
+ifeq ($(CONFIG_DMI),y)
+fb-y				  += fbcon_dmi_quirks.o
+endif
+endif
 fb-objs                           := $(fb-y)
 fb-objs                           := $(fb-y)
 
 
 obj-$(CONFIG_FB_CFB_FILLRECT)  += cfbfillrect.o
 obj-$(CONFIG_FB_CFB_FILLRECT)  += cfbfillrect.o

+ 2 - 6
drivers/video/console/bitblit.c → drivers/video/fbdev/core/bitblit.c

@@ -203,7 +203,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
 }
 }
 
 
 static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
 static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
-			      int bottom_only)
+			      int color, int bottom_only)
 {
 {
 	unsigned int cw = vc->vc_font.width;
 	unsigned int cw = vc->vc_font.width;
 	unsigned int ch = vc->vc_font.height;
 	unsigned int ch = vc->vc_font.height;
@@ -213,7 +213,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
 	unsigned int bs = info->var.yres - bh;
 	unsigned int bs = info->var.yres - bh;
 	struct fb_fillrect region;
 	struct fb_fillrect region;
 
 
-	region.color = 0;
+	region.color = color;
 	region.rop = ROP_COPY;
 	region.rop = ROP_COPY;
 
 
 	if (rw && !bottom_only) {
 	if (rw && !bottom_only) {
@@ -416,7 +416,3 @@ void fbcon_set_bitops(struct fbcon_ops *ops)
 
 
 EXPORT_SYMBOL(fbcon_set_bitops);
 EXPORT_SYMBOL(fbcon_set_bitops);
 
 
-MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
-MODULE_DESCRIPTION("Bit Blitting Operation");
-MODULE_LICENSE("GPL");
-

+ 22 - 15
drivers/video/console/fbcon.c → drivers/video/fbdev/core/fbcon.c

@@ -68,6 +68,7 @@
 #include <linux/kd.h>
 #include <linux/kd.h>
 #include <linux/slab.h>
 #include <linux/slab.h>
 #include <linux/fb.h>
 #include <linux/fb.h>
+#include <linux/fbcon.h>
 #include <linux/vt_kern.h>
 #include <linux/vt_kern.h>
 #include <linux/selection.h>
 #include <linux/selection.h>
 #include <linux/font.h>
 #include <linux/font.h>
@@ -135,8 +136,9 @@ static char fontname[40];
 static int info_idx = -1;
 static int info_idx = -1;
 
 
 /* console rotation */
 /* console rotation */
-static int initial_rotation;
+static int initial_rotation = -1;
 static int fbcon_has_sysfs;
 static int fbcon_has_sysfs;
+static int margin_color;
 
 
 static const struct consw fb_con;
 static const struct consw fb_con;
 
 
@@ -491,6 +493,13 @@ static int __init fb_console_setup(char *this_opt)
 				initial_rotation = 0;
 				initial_rotation = 0;
 			continue;
 			continue;
 		}
 		}
+
+		if (!strncmp(options, "margin:", 7)) {
+			options += 7;
+			if (*options)
+				margin_color = simple_strtoul(options, &options, 0);
+			continue;
+		}
 	}
 	}
 	return 1;
 	return 1;
 }
 }
@@ -563,7 +572,7 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info,
 	unsigned short *save = NULL, *r, *q;
 	unsigned short *save = NULL, *r, *q;
 	int logo_height;
 	int logo_height;
 
 
-	if (info->flags & FBINFO_MODULE) {
+	if (info->fbops->owner) {
 		logo_shown = FBCON_LOGO_DONTSHOW;
 		logo_shown = FBCON_LOGO_DONTSHOW;
 		return;
 		return;
 	}
 	}
@@ -954,7 +963,10 @@ static const char *fbcon_startup(void)
 	ops->cur_rotate = -1;
 	ops->cur_rotate = -1;
 	ops->cur_blink_jiffies = HZ / 5;
 	ops->cur_blink_jiffies = HZ / 5;
 	info->fbcon_par = ops;
 	info->fbcon_par = ops;
-	p->con_rotate = initial_rotation;
+	if (initial_rotation != -1)
+		p->con_rotate = initial_rotation;
+	else
+		p->con_rotate = fbcon_platform_get_rotate(info);
 	set_blitting_type(vc, info);
 	set_blitting_type(vc, info);
 
 
 	if (info->fix.type != FB_TYPE_TEXT) {
 	if (info->fix.type != FB_TYPE_TEXT) {
@@ -1091,7 +1103,10 @@ static void fbcon_init(struct vc_data *vc, int init)
 
 
 	ops = info->fbcon_par;
 	ops = info->fbcon_par;
 	ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
 	ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
-	p->con_rotate = initial_rotation;
+	if (initial_rotation != -1)
+		p->con_rotate = initial_rotation;
+	else
+		p->con_rotate = fbcon_platform_get_rotate(info);
 	set_blitting_type(vc, info);
 	set_blitting_type(vc, info);
 
 
 	cols = vc->vc_cols;
 	cols = vc->vc_cols;
@@ -1299,7 +1314,7 @@ static void fbcon_clear_margins(struct vc_data *vc, int bottom_only)
 	struct fbcon_ops *ops = info->fbcon_par;
 	struct fbcon_ops *ops = info->fbcon_par;
 
 
 	if (!fbcon_is_inactive(vc, info))
 	if (!fbcon_is_inactive(vc, info))
-		ops->clear_margins(vc, info, bottom_only);
+		ops->clear_margins(vc, info, margin_color, bottom_only);
 }
 }
 
 
 static void fbcon_cursor(struct vc_data *vc, int mode)
 static void fbcon_cursor(struct vc_data *vc, int mode)
@@ -3606,7 +3621,7 @@ static void fbcon_exit(void)
 	fbcon_has_exited = 1;
 	fbcon_has_exited = 1;
 }
 }
 
 
-static int __init fb_console_init(void)
+void __init fb_console_init(void)
 {
 {
 	int i;
 	int i;
 
 
@@ -3628,11 +3643,8 @@ static int __init fb_console_init(void)
 
 
 	console_unlock();
 	console_unlock();
 	fbcon_start();
 	fbcon_start();
-	return 0;
 }
 }
 
 
-fs_initcall(fb_console_init);
-
 #ifdef MODULE
 #ifdef MODULE
 
 
 static void __exit fbcon_deinit_device(void)
 static void __exit fbcon_deinit_device(void)
@@ -3647,7 +3659,7 @@ static void __exit fbcon_deinit_device(void)
 	}
 	}
 }
 }
 
 
-static void __exit fb_console_exit(void)
+void __exit fb_console_exit(void)
 {
 {
 	console_lock();
 	console_lock();
 	fb_unregister_client(&fbcon_event_notifier);
 	fb_unregister_client(&fbcon_event_notifier);
@@ -3657,9 +3669,4 @@ static void __exit fb_console_exit(void)
 	do_unregister_con_driver(&fb_con);
 	do_unregister_con_driver(&fb_con);
 	console_unlock();
 	console_unlock();
 }	
 }	
-
-module_exit(fb_console_exit);
-
 #endif
 #endif
-
-MODULE_LICENSE("GPL");

+ 7 - 2
drivers/video/console/fbcon.h → drivers/video/fbdev/core/fbcon.h

@@ -60,7 +60,7 @@ struct fbcon_ops {
 		      const unsigned short *s, int count, int yy, int xx,
 		      const unsigned short *s, int count, int yy, int xx,
 		      int fg, int bg);
 		      int fg, int bg);
 	void (*clear_margins)(struct vc_data *vc, struct fb_info *info,
 	void (*clear_margins)(struct vc_data *vc, struct fb_info *info,
-			      int bottom_only);
+			      int color, int bottom_only);
 	void (*cursor)(struct vc_data *vc, struct fb_info *info, int mode,
 	void (*cursor)(struct vc_data *vc, struct fb_info *info, int mode,
 		       int softback_lines, int fg, int bg);
 		       int softback_lines, int fg, int bg);
 	int  (*update_start)(struct fb_info *info);
 	int  (*update_start)(struct fb_info *info);
@@ -261,5 +261,10 @@ extern void fbcon_set_rotate(struct fbcon_ops *ops);
 #define fbcon_set_rotate(x) do {} while(0)
 #define fbcon_set_rotate(x) do {} while(0)
 #endif /* CONFIG_FRAMEBUFFER_CONSOLE_ROTATION */
 #endif /* CONFIG_FRAMEBUFFER_CONSOLE_ROTATION */
 
 
-#endif /* _VIDEO_FBCON_H */
+#ifdef CONFIG_DMI
+int fbcon_platform_get_rotate(struct fb_info *info);
+#else
+#define fbcon_platform_get_rotate(i) FB_ROTATE_UR
+#endif /* CONFIG_DMI */
 
 
+#endif /* _VIDEO_FBCON_H */

+ 2 - 6
drivers/video/console/fbcon_ccw.c → drivers/video/fbdev/core/fbcon_ccw.c

@@ -189,7 +189,7 @@ static void ccw_putcs(struct vc_data *vc, struct fb_info *info,
 }
 }
 
 
 static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info,
 static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info,
-			     int bottom_only)
+			      int color, int bottom_only)
 {
 {
 	unsigned int cw = vc->vc_font.width;
 	unsigned int cw = vc->vc_font.width;
 	unsigned int ch = vc->vc_font.height;
 	unsigned int ch = vc->vc_font.height;
@@ -198,7 +198,7 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info,
 	unsigned int bs = vc->vc_rows*ch;
 	unsigned int bs = vc->vc_rows*ch;
 	struct fb_fillrect region;
 	struct fb_fillrect region;
 
 
-	region.color = 0;
+	region.color = color;
 	region.rop = ROP_COPY;
 	region.rop = ROP_COPY;
 
 
 	if (rw && !bottom_only) {
 	if (rw && !bottom_only) {
@@ -418,7 +418,3 @@ void fbcon_rotate_ccw(struct fbcon_ops *ops)
 	ops->update_start = ccw_update_start;
 	ops->update_start = ccw_update_start;
 }
 }
 EXPORT_SYMBOL(fbcon_rotate_ccw);
 EXPORT_SYMBOL(fbcon_rotate_ccw);
-
-MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
-MODULE_DESCRIPTION("Console Rotation (270 degrees) Support");
-MODULE_LICENSE("GPL");

+ 2 - 6
drivers/video/console/fbcon_cw.c → drivers/video/fbdev/core/fbcon_cw.c

@@ -172,7 +172,7 @@ static void cw_putcs(struct vc_data *vc, struct fb_info *info,
 }
 }
 
 
 static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
 static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
-			     int bottom_only)
+			     int color, int bottom_only)
 {
 {
 	unsigned int cw = vc->vc_font.width;
 	unsigned int cw = vc->vc_font.width;
 	unsigned int ch = vc->vc_font.height;
 	unsigned int ch = vc->vc_font.height;
@@ -181,7 +181,7 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
 	unsigned int rs = info->var.yres - rw;
 	unsigned int rs = info->var.yres - rw;
 	struct fb_fillrect region;
 	struct fb_fillrect region;
 
 
-	region.color = 0;
+	region.color = color;
 	region.rop = ROP_COPY;
 	region.rop = ROP_COPY;
 
 
 	if (rw && !bottom_only) {
 	if (rw && !bottom_only) {
@@ -401,7 +401,3 @@ void fbcon_rotate_cw(struct fbcon_ops *ops)
 	ops->update_start = cw_update_start;
 	ops->update_start = cw_update_start;
 }
 }
 EXPORT_SYMBOL(fbcon_rotate_cw);
 EXPORT_SYMBOL(fbcon_rotate_cw);
-
-MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
-MODULE_DESCRIPTION("Console Rotation (90 degrees) Support");
-MODULE_LICENSE("GPL");

+ 145 - 0
drivers/video/fbdev/core/fbcon_dmi_quirks.c

@@ -0,0 +1,145 @@
+/*
+ *  fbcon_dmi_quirks.c -- DMI based quirk detection for fbcon
+ *
+ *	Copyright (C) 2017 Hans de Goede <hdegoede@redhat.com>
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+#include <linux/dmi.h>
+#include <linux/fb.h>
+#include <linux/kernel.h>
+#include "fbcon.h"
+
+/*
+ * Some x86 clamshell design devices use portrait tablet screens and a display
+ * engine which cannot rotate in hardware, so we need to rotate the fbcon to
+ * compensate. Unfortunately these (cheap) devices also typically have quite
+ * generic DMI data, so we match on a combination of DMI data, screen resolution
+ * and a list of known BIOS dates to avoid false positives.
+ */
+
+struct fbcon_dmi_rotate_data {
+	int width;
+	int height;
+	const char * const *bios_dates;
+	int rotate;
+};
+
+static const struct fbcon_dmi_rotate_data rotate_data_asus_t100ha = {
+	.width = 800,
+	.height = 1280,
+	.rotate = FB_ROTATE_CCW,
+};
+
+static const struct fbcon_dmi_rotate_data rotate_data_gpd_pocket = {
+	.width = 1200,
+	.height = 1920,
+	.bios_dates = (const char * const []){ "05/26/2017", "06/28/2017",
+		"07/05/2017", "08/07/2017", NULL },
+	.rotate = FB_ROTATE_CW,
+};
+
+static const struct fbcon_dmi_rotate_data rotate_data_gpd_win = {
+	.width = 720,
+	.height = 1280,
+	.bios_dates = (const char * const []){
+		"10/25/2016", "11/18/2016", "12/23/2016", "12/26/2016",
+		"02/21/2017", "03/20/2017", "05/25/2017", NULL },
+	.rotate = FB_ROTATE_CW,
+};
+
+static const struct fbcon_dmi_rotate_data rotate_data_itworks_tw891 = {
+	.width = 800,
+	.height = 1280,
+	.bios_dates = (const char * const []){ "10/16/2015", NULL },
+	.rotate = FB_ROTATE_CW,
+};
+
+static const struct fbcon_dmi_rotate_data rotate_data_vios_lth17 = {
+	.width = 800,
+	.height = 1280,
+	.rotate = FB_ROTATE_CW,
+};
+
+static const struct dmi_system_id rotate_data[] = {
+	{	/* Asus T100HA */
+		.matches = {
+		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100HAN"),
+		},
+		.driver_data = (void *)&rotate_data_asus_t100ha,
+	}, {	/*
+		 * GPD Pocket, note that the the DMI data is less generic then
+		 * it seems, devices with a board-vendor of "AMI Corporation"
+		 * are quite rare, as are devices which have both board- *and*
+		 * product-id set to "Default String"
+		 */
+		.matches = {
+		  DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
+		  DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
+		  DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
+		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
+		},
+		.driver_data = (void *)&rotate_data_gpd_pocket,
+	}, {	/* GPD Win (same note on DMI match as GPD Pocket) */
+		.matches = {
+		  DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
+		  DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
+		  DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
+		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
+		},
+		.driver_data = (void *)&rotate_data_gpd_win,
+	}, {	/* I.T.Works TW891 */
+		.matches = {
+		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
+		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "TW891"),
+		  DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
+		  DMI_EXACT_MATCH(DMI_BOARD_NAME, "TW891"),
+		},
+		.driver_data = (void *)&rotate_data_itworks_tw891,
+	}, {	/* VIOS LTH17 */
+		.matches = {
+		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "VIOS"),
+		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "LTH17"),
+		  DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "VIOS"),
+		  DMI_EXACT_MATCH(DMI_BOARD_NAME, "LTH17"),
+		},
+		.driver_data = (void *)&rotate_data_vios_lth17,
+	},
+	{}
+};
+
+int fbcon_platform_get_rotate(struct fb_info *info)
+{
+	const struct dmi_system_id *match;
+	const struct fbcon_dmi_rotate_data *data;
+	const char *bios_date;
+	int i;
+
+	for (match = dmi_first_match(rotate_data);
+	     match;
+	     match = dmi_first_match(match + 1)) {
+		data = match->driver_data;
+
+		if (data->width != info->var.xres ||
+		    data->height != info->var.yres)
+			continue;
+
+		if (!data->bios_dates)
+			return data->rotate;
+
+		bios_date = dmi_get_system_info(DMI_BIOS_DATE);
+		if (!bios_date)
+			continue;
+
+		for (i = 0; data->bios_dates[i]; i++) {
+			if (!strcmp(data->bios_dates[i], bios_date))
+				return data->rotate;
+		}
+	}
+
+	return FB_ROTATE_UR;
+}

+ 0 - 4
drivers/video/console/fbcon_rotate.c → drivers/video/fbdev/core/fbcon_rotate.c

@@ -110,7 +110,3 @@ void fbcon_set_rotate(struct fbcon_ops *ops)
 	}
 	}
 }
 }
 EXPORT_SYMBOL(fbcon_set_rotate);
 EXPORT_SYMBOL(fbcon_set_rotate);
-
-MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
-MODULE_DESCRIPTION("Console Rotation Support");
-MODULE_LICENSE("GPL");

+ 0 - 0
drivers/video/console/fbcon_rotate.h → drivers/video/fbdev/core/fbcon_rotate.h


+ 2 - 6
drivers/video/console/fbcon_ud.c → drivers/video/fbdev/core/fbcon_ud.c

@@ -220,7 +220,7 @@ static void ud_putcs(struct vc_data *vc, struct fb_info *info,
 }
 }
 
 
 static void ud_clear_margins(struct vc_data *vc, struct fb_info *info,
 static void ud_clear_margins(struct vc_data *vc, struct fb_info *info,
-			     int bottom_only)
+			     int color, int bottom_only)
 {
 {
 	unsigned int cw = vc->vc_font.width;
 	unsigned int cw = vc->vc_font.width;
 	unsigned int ch = vc->vc_font.height;
 	unsigned int ch = vc->vc_font.height;
@@ -228,7 +228,7 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info,
 	unsigned int bh = info->var.yres - (vc->vc_rows*ch);
 	unsigned int bh = info->var.yres - (vc->vc_rows*ch);
 	struct fb_fillrect region;
 	struct fb_fillrect region;
 
 
-	region.color = 0;
+	region.color = color;
 	region.rop = ROP_COPY;
 	region.rop = ROP_COPY;
 
 
 	if (rw && !bottom_only) {
 	if (rw && !bottom_only) {
@@ -446,7 +446,3 @@ void fbcon_rotate_ud(struct fbcon_ops *ops)
 	ops->update_start = ud_update_start;
 	ops->update_start = ud_update_start;
 }
 }
 EXPORT_SYMBOL(fbcon_rotate_ud);
 EXPORT_SYMBOL(fbcon_rotate_ud);
-
-MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
-MODULE_DESCRIPTION("Console Rotation (180 degrees) Support");
-MODULE_LICENSE("GPL");

+ 9 - 3
drivers/video/fbdev/core/fbmem.c

@@ -32,6 +32,7 @@
 #include <linux/device.h>
 #include <linux/device.h>
 #include <linux/efi.h>
 #include <linux/efi.h>
 #include <linux/fb.h>
 #include <linux/fb.h>
+#include <linux/fbcon.h>
 #include <linux/mem_encrypt.h>
 #include <linux/mem_encrypt.h>
 
 
 #include <asm/fb.h>
 #include <asm/fb.h>
@@ -316,7 +317,7 @@ static void fb_set_logo(struct fb_info *info,
 		for (i = 0; i < logo->height; i++) {
 		for (i = 0; i < logo->height; i++) {
 			for (j = 0; j < logo->width; src++) {
 			for (j = 0; j < logo->width; src++) {
 				d = *src ^ xor;
 				d = *src ^ xor;
-				for (k = 7; k >= 0; k--) {
+				for (k = 7; k >= 0 && j < logo->width; k--) {
 					*dst++ = ((d >> k) & 1) ? fg : 0;
 					*dst++ = ((d >> k) & 1) ? fg : 0;
 					j++;
 					j++;
 				}
 				}
@@ -463,7 +464,7 @@ static int fb_show_logo_line(struct fb_info *info, int rotate,
 
 
 	/* Return if the frame buffer is not mapped or suspended */
 	/* Return if the frame buffer is not mapped or suspended */
 	if (logo == NULL || info->state != FBINFO_STATE_RUNNING ||
 	if (logo == NULL || info->state != FBINFO_STATE_RUNNING ||
-	    info->flags & FBINFO_MODULE)
+	    info->fbops->owner)
 		return 0;
 		return 0;
 
 
 	image.depth = 8;
 	image.depth = 8;
@@ -601,7 +602,7 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
 	memset(&fb_logo, 0, sizeof(struct logo_data));
 	memset(&fb_logo, 0, sizeof(struct logo_data));
 
 
 	if (info->flags & FBINFO_MISC_TILEBLITTING ||
 	if (info->flags & FBINFO_MISC_TILEBLITTING ||
-	    info->flags & FBINFO_MODULE)
+	    info->fbops->owner)
 		return 0;
 		return 0;
 
 
 	if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
 	if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
@@ -1892,6 +1893,9 @@ fbmem_init(void)
 		fb_class = NULL;
 		fb_class = NULL;
 		goto err_class;
 		goto err_class;
 	}
 	}
+
+	fb_console_init();
+
 	return 0;
 	return 0;
 
 
 err_class:
 err_class:
@@ -1906,6 +1910,8 @@ module_init(fbmem_init);
 static void __exit
 static void __exit
 fbmem_exit(void)
 fbmem_exit(void)
 {
 {
+	fb_console_exit();
+
 	remove_proc_entry("fb", NULL);
 	remove_proc_entry("fb", NULL);
 	class_destroy(fb_class);
 	class_destroy(fb_class);
 	unregister_chrdev(FB_MAJOR, "fb");
 	unregister_chrdev(FB_MAJOR, "fb");

+ 2 - 2
drivers/video/fbdev/core/fbmon.c

@@ -1479,8 +1479,8 @@ int of_get_fb_videomode(struct device_node *np, struct fb_videomode *fb,
 	if (ret)
 	if (ret)
 		return ret;
 		return ret;
 
 
-	pr_debug("%s: got %dx%d display mode from %s\n",
-		of_node_full_name(np), vm.hactive, vm.vactive, np->name);
+	pr_debug("%pOF: got %dx%d display mode from %s\n",
+		np, vm.hactive, vm.vactive, np->name);
 	dump_fb_videomode(fb);
 	dump_fb_videomode(fb);
 
 
 	return 0;
 	return 0;

+ 0 - 4
drivers/video/console/softcursor.c → drivers/video/fbdev/core/softcursor.c

@@ -76,7 +76,3 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor)
 }
 }
 
 
 EXPORT_SYMBOL(soft_cursor);
 EXPORT_SYMBOL(soft_cursor);
-
-MODULE_AUTHOR("James Simmons <jsimmons@users.sf.net>");
-MODULE_DESCRIPTION("Generic software cursor");
-MODULE_LICENSE("GPL");

+ 1 - 6
drivers/video/console/tileblit.c → drivers/video/fbdev/core/tileblit.c

@@ -74,7 +74,7 @@ static void tile_putcs(struct vc_data *vc, struct fb_info *info,
 }
 }
 
 
 static void tile_clear_margins(struct vc_data *vc, struct fb_info *info,
 static void tile_clear_margins(struct vc_data *vc, struct fb_info *info,
-			       int bottom_only)
+			       int color, int bottom_only)
 {
 {
 	return;
 	return;
 }
 }
@@ -152,8 +152,3 @@ void fbcon_set_tileops(struct vc_data *vc, struct fb_info *info)
 }
 }
 
 
 EXPORT_SYMBOL(fbcon_set_tileops);
 EXPORT_SYMBOL(fbcon_set_tileops);
-
-MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
-MODULE_DESCRIPTION("Tile Blitting Operation");
-MODULE_LICENSE("GPL");
-

+ 1 - 1
drivers/video/fbdev/cyber2000fb.c

@@ -1336,7 +1336,7 @@ static void cyber2000fb_i2c_unregister(struct cfb_info *cfb)
  * These parameters give
  * These parameters give
  * 640x480, hsync 31.5kHz, vsync 60Hz
  * 640x480, hsync 31.5kHz, vsync 60Hz
  */
  */
-static struct fb_videomode cyber2000fb_default_mode = {
+static const struct fb_videomode cyber2000fb_default_mode = {
 	.refresh	= 60,
 	.refresh	= 60,
 	.xres		= 640,
 	.xres		= 640,
 	.yres		= 480,
 	.yres		= 480,

+ 1 - 1
drivers/video/fbdev/da8xx-fb.c

@@ -1341,7 +1341,7 @@ static int fb_probe(struct platform_device *device)
 {
 {
 	struct da8xx_lcdc_platform_data *fb_pdata =
 	struct da8xx_lcdc_platform_data *fb_pdata =
 						dev_get_platdata(&device->dev);
 						dev_get_platdata(&device->dev);
-	static struct resource *lcdc_regs;
+	struct resource *lcdc_regs;
 	struct lcd_ctrl_config *lcd_cfg;
 	struct lcd_ctrl_config *lcd_cfg;
 	struct fb_videomode *lcdc_info;
 	struct fb_videomode *lcdc_info;
 	struct fb_info *da8xx_fb_info;
 	struct fb_info *da8xx_fb_info;

+ 1 - 1
drivers/video/fbdev/dnfb.c

@@ -126,7 +126,7 @@ struct fb_var_screeninfo dnfb_var = {
 	.vmode		= FB_VMODE_NONINTERLACED,
 	.vmode		= FB_VMODE_NONINTERLACED,
 };
 };
 
 
-static struct fb_fix_screeninfo dnfb_fix = {
+static const struct fb_fix_screeninfo dnfb_fix = {
 	.id		= "Apollo Mono",
 	.id		= "Apollo Mono",
 	.smem_start	= (FRAME_BUFFER_START + IO_BASE),
 	.smem_start	= (FRAME_BUFFER_START + IO_BASE),
 	.smem_len	= FRAME_BUFFER_LEN,
 	.smem_len	= FRAME_BUFFER_LEN,

+ 1 - 1
drivers/video/fbdev/fb-puv3.c

@@ -69,7 +69,7 @@ static const struct fb_videomode unifb_modes[] = {
 	  0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
 	  0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
 };
 };
 
 
-static struct fb_var_screeninfo unifb_default = {
+static const struct fb_var_screeninfo unifb_default = {
 	.xres =		640,
 	.xres =		640,
 	.yres =		480,
 	.yres =		480,
 	.xres_virtual =	640,
 	.xres_virtual =	640,

+ 2 - 2
drivers/video/fbdev/ffb.c

@@ -997,9 +997,9 @@ static int ffb_probe(struct platform_device *op)
 
 
 	dev_set_drvdata(&op->dev, info);
 	dev_set_drvdata(&op->dev, info);
 
 
-	printk(KERN_INFO "%s: %s at %016lx, type %d, "
+	printk(KERN_INFO "%pOF: %s at %016lx, type %d, "
 	       "DAC pnum[%x] rev[%d] manuf_rev[%d]\n",
 	       "DAC pnum[%x] rev[%d] manuf_rev[%d]\n",
-	       dp->full_name,
+	       dp,
 	       ((par->flags & FFB_FLAG_AFB) ? "AFB" : "FFB"),
 	       ((par->flags & FFB_FLAG_AFB) ? "AFB" : "FFB"),
 	       par->physbase, par->board_type,
 	       par->physbase, par->board_type,
 	       dac_pnum, dac_rev, dac_mrev);
 	       dac_pnum, dac_rev, dac_mrev);

+ 1 - 1
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,
 
 
 static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id);
 static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id);
 
 
-static struct zorro_device_id fm2fb_devices[] = {
+static const struct zorro_device_id fm2fb_devices[] = {
 	{ ZORRO_PROD_BSC_FRAMEMASTER_II },
 	{ ZORRO_PROD_BSC_FRAMEMASTER_II },
 	{ ZORRO_PROD_HELFRICH_RAINBOW_II },
 	{ ZORRO_PROD_HELFRICH_RAINBOW_II },
 	{ 0 }
 	{ 0 }

+ 1 - 1
drivers/video/fbdev/geode/gxfb_core.c

@@ -474,7 +474,7 @@ static void gxfb_remove(struct pci_dev *pdev)
 	framebuffer_release(info);
 	framebuffer_release(info);
 }
 }
 
 
-static struct pci_device_id gxfb_id_table[] = {
+static const struct pci_device_id gxfb_id_table[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_GX_VIDEO) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_GX_VIDEO) },
 	{ 0, }
 	{ 0, }
 };
 };

+ 1 - 1
drivers/video/fbdev/grvga.c

@@ -70,7 +70,7 @@ static const struct fb_videomode grvga_modedb[] = {
     }
     }
  };
  };
 
 
-static struct fb_fix_screeninfo grvga_fix = {
+static const struct fb_fix_screeninfo grvga_fix = {
 	.id =		"AG SVGACTRL",
 	.id =		"AG SVGACTRL",
 	.type =		FB_TYPE_PACKED_PIXELS,
 	.type =		FB_TYPE_PACKED_PIXELS,
 	.visual =       FB_VISUAL_PSEUDOCOLOR,
 	.visual =       FB_VISUAL_PSEUDOCOLOR,

+ 2 - 2
drivers/video/fbdev/i810/i810_main.c

@@ -107,7 +107,7 @@ static const char * const i810_pci_list[] = {
 	"Intel(R) 815 (Internal Graphics with AGP) Framebuffer Device"
 	"Intel(R) 815 (Internal Graphics with AGP) Framebuffer Device"
 };
 };
 
 
-static struct pci_device_id i810fb_pci_tbl[] = {
+static const struct pci_device_id i810fb_pci_tbl[] = {
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG1,
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG1,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG3,
 	{ 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)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct fb_ops i810fb_ops = {
+static const struct fb_ops i810fb_ops = {
 	.owner =             THIS_MODULE,
 	.owner =             THIS_MODULE,
 	.fb_open =           i810fb_open,
 	.fb_open =           i810fb_open,
 	.fb_release =        i810fb_release,
 	.fb_release =        i810fb_release,

+ 1 - 1
drivers/video/fbdev/imsttfb.c

@@ -1318,7 +1318,7 @@ imsttfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
 	}
 	}
 }
 }
 
 
-static struct pci_device_id imsttfb_pci_tbl[] = {
+static const struct pci_device_id imsttfb_pci_tbl[] = {
 	{ PCI_VENDOR_ID_IMS, PCI_DEVICE_ID_IMS_TT128,
 	{ PCI_VENDOR_ID_IMS, PCI_DEVICE_ID_IMS_TT128,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, IBM },
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, IBM },
 	{ PCI_VENDOR_ID_IMS, PCI_DEVICE_ID_IMS_TT3D,
 	{ PCI_VENDOR_ID_IMS, PCI_DEVICE_ID_IMS_TT3D,

+ 1 - 1
drivers/video/fbdev/intelfb/intelfbdrv.c

@@ -173,7 +173,7 @@ static int intelfb_set_fbinfo(struct intelfb_info *dinfo);
 #define INTELFB_CLASS_MASK 0
 #define INTELFB_CLASS_MASK 0
 #endif
 #endif
 
 
-static struct pci_device_id intelfb_pci_table[] = {
+static const struct pci_device_id intelfb_pci_table[] = {
 	{ 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 },
 	{ 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 },
 	{ 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 },
 	{ 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 },
 	{ 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 },
 	{ 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 },

+ 1 - 1
drivers/video/fbdev/kyro/fbdev.c

@@ -633,7 +633,7 @@ static int kyrofb_ioctl(struct fb_info *info,
 	return 0;
 	return 0;
 }
 }
 
 
-static struct pci_device_id kyrofb_pci_tbl[] = {
+static const struct pci_device_id kyrofb_pci_tbl[] = {
 	{ PCI_VENDOR_ID_ST, PCI_DEVICE_ID_STG4000,
 	{ PCI_VENDOR_ID_ST, PCI_DEVICE_ID_STG4000,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ 0, }
 	{ 0, }

+ 2 - 2
drivers/video/fbdev/leo.c

@@ -619,8 +619,8 @@ static int leo_probe(struct platform_device *op)
 
 
 	dev_set_drvdata(&op->dev, info);
 	dev_set_drvdata(&op->dev, info);
 
 
-	printk(KERN_INFO "%s: leo at %lx:%lx\n",
-	       dp->full_name,
+	printk(KERN_INFO "%pOF: leo at %lx:%lx\n",
+	       dp,
 	       par->which_io, info->fix.smem_start);
 	       par->which_io, info->fix.smem_start);
 
 
 	return 0;
 	return 0;

+ 6 - 8
drivers/video/fbdev/matrox/matroxfb_base.c

@@ -1198,7 +1198,7 @@ static int matroxfb_blank(int blank, struct fb_info *info)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct fb_ops matroxfb_ops = {
+static const struct fb_ops matroxfb_ops = {
 	.owner =	THIS_MODULE,
 	.owner =	THIS_MODULE,
 	.fb_open =	matroxfb_open,
 	.fb_open =	matroxfb_open,
 	.fb_release =	matroxfb_release,
 	.fb_release =	matroxfb_release,
@@ -1573,14 +1573,14 @@ static struct board {
 		NULL}};
 		NULL}};
 
 
 #ifndef MODULE
 #ifndef MODULE
-static struct fb_videomode defaultmode = {
+static const struct fb_videomode defaultmode = {
 	/* 640x480 @ 60Hz, 31.5 kHz */
 	/* 640x480 @ 60Hz, 31.5 kHz */
 	NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
 	NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
 	0, FB_VMODE_NONINTERLACED
 	0, FB_VMODE_NONINTERLACED
 };
 };
-#endif /* !MODULE */
 
 
 static int hotplug = 0;
 static int hotplug = 0;
+#endif /* !MODULE */
 
 
 static void setDefaultOutputs(struct matrox_fb_info *minfo)
 static void setDefaultOutputs(struct matrox_fb_info *minfo)
 {
 {
@@ -1623,7 +1623,7 @@ static int initMatrox2(struct matrox_fb_info *minfo, struct board *b)
 	unsigned int memsize;
 	unsigned int memsize;
 	int err;
 	int err;
 
 
-	static struct pci_device_id intel_82437[] = {
+	static const struct pci_device_id intel_82437[] = {
 		{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437) },
 		{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437) },
 		{ },
 		{ },
 	};
 	};
@@ -1794,9 +1794,7 @@ static int initMatrox2(struct matrox_fb_info *minfo, struct board *b)
 	minfo->fbops = matroxfb_ops;
 	minfo->fbops = matroxfb_ops;
 	minfo->fbcon.fbops = &minfo->fbops;
 	minfo->fbcon.fbops = &minfo->fbops;
 	minfo->fbcon.pseudo_palette = minfo->cmap;
 	minfo->fbcon.pseudo_palette = minfo->cmap;
-	/* after __init time we are like module... no logo */
-	minfo->fbcon.flags = hotplug ? FBINFO_FLAG_MODULE : FBINFO_FLAG_DEFAULT;
-	minfo->fbcon.flags |= FBINFO_PARTIAL_PAN_OK | 	 /* Prefer panning for scroll under MC viewer/edit */
+	minfo->fbcon.flags = FBINFO_PARTIAL_PAN_OK | 	 /* Prefer panning for scroll under MC viewer/edit */
 				      FBINFO_HWACCEL_COPYAREA |  /* We have hw-assisted bmove */
 				      FBINFO_HWACCEL_COPYAREA |  /* We have hw-assisted bmove */
 				      FBINFO_HWACCEL_FILLRECT |  /* And fillrect */
 				      FBINFO_HWACCEL_FILLRECT |  /* And fillrect */
 				      FBINFO_HWACCEL_IMAGEBLIT | /* And imageblit */
 				      FBINFO_HWACCEL_IMAGEBLIT | /* And imageblit */
@@ -2116,7 +2114,7 @@ static void pci_remove_matrox(struct pci_dev* pdev) {
 	matroxfb_remove(minfo, 1);
 	matroxfb_remove(minfo, 1);
 }
 }
 
 
-static struct pci_device_id matroxfb_devices[] = {
+static const struct pci_device_id matroxfb_devices[] = {
 #ifdef CONFIG_FB_MATROX_MILLENIUM
 #ifdef CONFIG_FB_MATROX_MILLENIUM
 	{PCI_VENDOR_ID_MATROX,	PCI_DEVICE_ID_MATROX_MIL,
 	{PCI_VENDOR_ID_MATROX,	PCI_DEVICE_ID_MATROX_MIL,
 		PCI_ANY_ID,	PCI_ANY_ID,	0, 0, 0},
 		PCI_ANY_ID,	PCI_ANY_ID,	0, 0, 0},

+ 1 - 1
drivers/video/fbdev/maxinefb.c

@@ -39,7 +39,7 @@
 
 
 static struct fb_info fb_info;
 static struct fb_info fb_info;
 
 
-static struct fb_var_screeninfo maxinefb_defined = {
+static const struct fb_var_screeninfo maxinefb_defined = {
 	.xres =		1024,
 	.xres =		1024,
 	.yres =		768,
 	.yres =		768,
 	.xres_virtual =	1024,
 	.xres_virtual =	1024,

+ 1 - 1
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c

@@ -982,7 +982,7 @@ static inline int mb862xx_pci_gdc_init(struct mb862xxfb_par *par)
 #define CHIP_ID(id)	\
 #define CHIP_ID(id)	\
 	{ PCI_DEVICE(PCI_VENDOR_ID_FUJITSU_LIMITED, id) }
 	{ PCI_DEVICE(PCI_VENDOR_ID_FUJITSU_LIMITED, id) }
 
 
-static struct pci_device_id mb862xx_pci_tbl[] = {
+static const struct pci_device_id mb862xx_pci_tbl[] = {
 	/* MB86295/MB86296 */
 	/* MB86295/MB86296 */
 	CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALP),
 	CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALP),
 	CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALPA),
 	CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALPA),

+ 2 - 2
drivers/video/fbdev/mbx/mbxfb.c

@@ -79,7 +79,7 @@ struct mbxfb_info {
 
 
 };
 };
 
 
-static struct fb_var_screeninfo mbxfb_default = {
+static const struct fb_var_screeninfo mbxfb_default = {
 	.xres = 640,
 	.xres = 640,
 	.yres = 480,
 	.yres = 480,
 	.xres_virtual = 640,
 	.xres_virtual = 640,
@@ -102,7 +102,7 @@ static struct fb_var_screeninfo mbxfb_default = {
 	.sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
 	.sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
 };
 };
 
 
-static struct fb_fix_screeninfo mbxfb_fix = {
+static const struct fb_fix_screeninfo mbxfb_fix = {
 	.id = "MBX",
 	.id = "MBX",
 	.type = FB_TYPE_PACKED_PIXELS,
 	.type = FB_TYPE_PACKED_PIXELS,
 	.visual = FB_VISUAL_TRUECOLOR,
 	.visual = FB_VISUAL_TRUECOLOR,

+ 1 - 1
drivers/video/fbdev/neofb.c

@@ -2138,7 +2138,7 @@ static void neofb_remove(struct pci_dev *dev)
 	}
 	}
 }
 }
 
 
-static struct pci_device_id neofb_devices[] = {
+static const struct pci_device_id neofb_devices[] = {
 	{PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2070,
 	{PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2070,
 	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2070},
 	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2070},
 
 

+ 1 - 1
drivers/video/fbdev/nvidia/nvidia.c

@@ -55,7 +55,7 @@
 /* HW cursor parameters */
 /* HW cursor parameters */
 #define MAX_CURS		32
 #define MAX_CURS		32
 
 
-static struct pci_device_id nvidiafb_pci_tbl[] = {
+static const struct pci_device_id nvidiafb_pci_tbl[] = {
 	{PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
 	{PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
 	 PCI_BASE_CLASS_DISPLAY << 16, 0xff0000, 0},
 	 PCI_BASE_CLASS_DISPLAY << 16, 0xff0000, 0},
 	{ 0, }
 	{ 0, }

+ 4 - 6
drivers/video/fbdev/offb.c

@@ -383,7 +383,7 @@ static void offb_init_palette_hacks(struct fb_info *info, struct device_node *dp
 		FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_STATIC_PSEUDOCOLOR;
 		FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_STATIC_PSEUDOCOLOR;
 }
 }
 
 
-static void __init offb_init_fb(const char *name, const char *full_name,
+static void __init offb_init_fb(const char *name,
 				int width, int height, int depth,
 				int width, int height, int depth,
 				int pitch, unsigned long address,
 				int pitch, unsigned long address,
 				int foreign_endian, struct device_node *dp)
 				int foreign_endian, struct device_node *dp)
@@ -402,14 +402,13 @@ static void __init offb_init_fb(const char *name, const char *full_name,
 	       "Using unsupported %dx%d %s at %lx, depth=%d, pitch=%d\n",
 	       "Using unsupported %dx%d %s at %lx, depth=%d, pitch=%d\n",
 	       width, height, name, address, depth, pitch);
 	       width, height, name, address, depth, pitch);
 	if (depth != 8 && depth != 15 && depth != 16 && depth != 32) {
 	if (depth != 8 && depth != 15 && depth != 16 && depth != 32) {
-		printk(KERN_ERR "%s: can't use depth = %d\n", full_name,
-		       depth);
+		printk(KERN_ERR "%pOF: can't use depth = %d\n", dp, depth);
 		release_mem_region(res_start, res_size);
 		release_mem_region(res_start, res_size);
 		return;
 		return;
 	}
 	}
 
 
 	info = framebuffer_alloc(sizeof(u32) * 16, NULL);
 	info = framebuffer_alloc(sizeof(u32) * 16, NULL);
-	
+
 	if (info == 0) {
 	if (info == 0) {
 		release_mem_region(res_start, res_size);
 		release_mem_region(res_start, res_size);
 		return;
 		return;
@@ -515,7 +514,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
 	if (register_framebuffer(info) < 0)
 	if (register_framebuffer(info) < 0)
 		goto out_err;
 		goto out_err;
 
 
-	fb_info(info, "Open Firmware frame buffer device on %s\n", full_name);
+	fb_info(info, "Open Firmware frame buffer device on %pOF\n", dp);
 	return;
 	return;
 
 
 out_err:
 out_err:
@@ -644,7 +643,6 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)
 		if (strcmp(dp->name, "valkyrie") == 0)
 		if (strcmp(dp->name, "valkyrie") == 0)
 			address += 0x1000;
 			address += 0x1000;
 		offb_init_fb(no_real_node ? "bootx" : dp->name,
 		offb_init_fb(no_real_node ? "bootx" : dp->name,
-			     no_real_node ? "display" : dp->full_name,
 			     width, height, depth, pitch, address,
 			     width, height, depth, pitch, address,
 			     foreign_endian, no_real_node ? NULL : dp);
 			     foreign_endian, no_real_node ? NULL : dp);
 	}
 	}

+ 1 - 1
drivers/video/fbdev/omap/lcd_mipid.c

@@ -496,7 +496,7 @@ static void mipid_cleanup(struct lcd_panel *panel)
 		mipid_esd_stop_check(md);
 		mipid_esd_stop_check(md);
 }
 }
 
 
-static struct lcd_panel mipid_panel = {
+static const struct lcd_panel mipid_panel = {
 	.config		= OMAP_LCDC_PANEL_TFT,
 	.config		= OMAP_LCDC_PANEL_TFT,
 
 
 	.bpp		= 16,
 	.bpp		= 16,

+ 1 - 1
drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c

@@ -18,7 +18,7 @@
 
 
 #include <video/omapfb_dss.h>
 #include <video/omapfb_dss.h>
 
 
-static struct omap_video_timings lb035q02_timings = {
+static const struct omap_video_timings lb035q02_timings = {
 	.x_res = 320,
 	.x_res = 320,
 	.y_res = 240,
 	.y_res = 240,
 
 

+ 1 - 1
drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c

@@ -509,7 +509,7 @@ static struct attribute *bldev_attrs[] = {
 	NULL,
 	NULL,
 };
 };
 
 
-static struct attribute_group bldev_attr_group = {
+static const struct attribute_group bldev_attr_group = {
 	.attrs = bldev_attrs,
 	.attrs = bldev_attrs,
 };
 };
 
 

+ 1 - 1
drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c

@@ -41,7 +41,7 @@ struct panel_drv_data {
 	struct spi_device *spi_dev;
 	struct spi_device *spi_dev;
 };
 };
 
 
-static struct omap_video_timings td028ttec1_panel_timings = {
+static const struct omap_video_timings td028ttec1_panel_timings = {
 	.x_res		= 480,
 	.x_res		= 480,
 	.y_res		= 640,
 	.y_res		= 640,
 	.pixelclock	= 22153000,
 	.pixelclock	= 22153000,

+ 1 - 1
drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c

@@ -282,7 +282,7 @@ static struct attribute *tpo_td043_attrs[] = {
 	NULL,
 	NULL,
 };
 };
 
 
-static struct attribute_group tpo_td043_attr_group = {
+static const struct attribute_group tpo_td043_attr_group = {
 	.attrs = tpo_td043_attrs,
 	.attrs = tpo_td043_attrs,
 };
 };
 
 

+ 2 - 1
drivers/video/fbdev/omap2/omapfb/dss/dss-of.c

@@ -16,6 +16,7 @@
 #include <linux/err.h>
 #include <linux/err.h>
 #include <linux/module.h>
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of.h>
+#include <linux/of_graph.h>
 #include <linux/seq_file.h>
 #include <linux/seq_file.h>
 
 
 #include <video/omapfb_dss.h>
 #include <video/omapfb_dss.h>
@@ -128,7 +129,7 @@ static struct device_node *omapdss_of_get_remote_port(const struct device_node *
 {
 {
 	struct device_node *np;
 	struct device_node *np;
 
 
-	np = of_parse_phandle(node, "remote-endpoint", 0);
+	np = of_graph_get_remote_endpoint(node);
 	if (!np)
 	if (!np)
 		return NULL;
 		return NULL;
 
 

+ 2 - 2
drivers/video/fbdev/p9100.c

@@ -304,8 +304,8 @@ static int p9100_probe(struct platform_device *op)
 
 
 	dev_set_drvdata(&op->dev, info);
 	dev_set_drvdata(&op->dev, info);
 
 
-	printk(KERN_INFO "%s: p9100 at %lx:%lx\n",
-	       dp->full_name,
+	printk(KERN_INFO "%pOF: p9100 at %lx:%lx\n",
+	       dp,
 	       par->which_io, info->fix.smem_start);
 	       par->which_io, info->fix.smem_start);
 
 
 	return 0;
 	return 0;

+ 1 - 1
drivers/video/fbdev/pm2fb.c

@@ -1732,7 +1732,7 @@ static void pm2fb_remove(struct pci_dev *pdev)
 	framebuffer_release(info);
 	framebuffer_release(info);
 }
 }
 
 
-static struct pci_device_id pm2fb_id_table[] = {
+static const struct pci_device_id pm2fb_id_table[] = {
 	{ PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_TVP4020,
 	{ PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_TVP4020,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ PCI_VENDOR_ID_3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2,
 	{ PCI_VENDOR_ID_3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2,

+ 1 - 1
drivers/video/fbdev/pm3fb.c

@@ -1479,7 +1479,7 @@ static void pm3fb_remove(struct pci_dev *dev)
 	}
 	}
 }
 }
 
 
-static struct pci_device_id pm3fb_id_table[] = {
+static const struct pci_device_id pm3fb_id_table[] = {
 	{ PCI_VENDOR_ID_3DLABS, 0x0a,
 	{ PCI_VENDOR_ID_3DLABS, 0x0a,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ 0, }
 	{ 0, }

+ 2 - 2
drivers/video/fbdev/pmag-aa-fb.c

@@ -67,7 +67,7 @@ struct aafb_par {
 	struct bt431_regs __iomem *bt431;
 	struct bt431_regs __iomem *bt431;
 };
 };
 
 
-static struct fb_var_screeninfo aafb_defined = {
+static const struct fb_var_screeninfo aafb_defined = {
 	.xres		= 1280,
 	.xres		= 1280,
 	.yres		= 1024,
 	.yres		= 1024,
 	.xres_virtual	= 2048,
 	.xres_virtual	= 2048,
@@ -90,7 +90,7 @@ static struct fb_var_screeninfo aafb_defined = {
 	.vmode		= FB_VMODE_NONINTERLACED,
 	.vmode		= FB_VMODE_NONINTERLACED,
 };
 };
 
 
-static struct fb_fix_screeninfo aafb_fix = {
+static const struct fb_fix_screeninfo aafb_fix = {
 	.id		= "PMAG-AA",
 	.id		= "PMAG-AA",
 	.smem_len	= (2048 * 1024),
 	.smem_len	= (2048 * 1024),
 	.type		= FB_TYPE_PACKED_PIXELS,
 	.type		= FB_TYPE_PACKED_PIXELS,

+ 2 - 2
drivers/video/fbdev/pmag-ba-fb.c

@@ -43,7 +43,7 @@ struct pmagbafb_par {
 };
 };
 
 
 
 
-static struct fb_var_screeninfo pmagbafb_defined = {
+static const struct fb_var_screeninfo pmagbafb_defined = {
 	.xres		= 1024,
 	.xres		= 1024,
 	.yres		= 864,
 	.yres		= 864,
 	.xres_virtual	= 1024,
 	.xres_virtual	= 1024,
@@ -67,7 +67,7 @@ static struct fb_var_screeninfo pmagbafb_defined = {
 	.vmode		= FB_VMODE_NONINTERLACED,
 	.vmode		= FB_VMODE_NONINTERLACED,
 };
 };
 
 
-static struct fb_fix_screeninfo pmagbafb_fix = {
+static const struct fb_fix_screeninfo pmagbafb_fix = {
 	.id		= "PMAG-BA",
 	.id		= "PMAG-BA",
 	.smem_len	= (1024 * 1024),
 	.smem_len	= (1024 * 1024),
 	.type		= FB_TYPE_PACKED_PIXELS,
 	.type		= FB_TYPE_PACKED_PIXELS,

+ 2 - 2
drivers/video/fbdev/pmagb-b-fb.c

@@ -44,7 +44,7 @@ struct pmagbbfb_par {
 };
 };
 
 
 
 
-static struct fb_var_screeninfo pmagbbfb_defined = {
+static const struct fb_var_screeninfo pmagbbfb_defined = {
 	.bits_per_pixel	= 8,
 	.bits_per_pixel	= 8,
 	.red.length	= 8,
 	.red.length	= 8,
 	.green.length	= 8,
 	.green.length	= 8,
@@ -57,7 +57,7 @@ static struct fb_var_screeninfo pmagbbfb_defined = {
 	.vmode		= FB_VMODE_NONINTERLACED,
 	.vmode		= FB_VMODE_NONINTERLACED,
 };
 };
 
 
-static struct fb_fix_screeninfo pmagbbfb_fix = {
+static const struct fb_fix_screeninfo pmagbbfb_fix = {
 	.id		= "PMAGB-BA",
 	.id		= "PMAGB-BA",
 	.smem_len	= (2048 * 1024),
 	.smem_len	= (2048 * 1024),
 	.type		= FB_TYPE_PACKED_PIXELS,
 	.type		= FB_TYPE_PACKED_PIXELS,

+ 1 - 1
drivers/video/fbdev/ps3fb.c

@@ -952,7 +952,7 @@ static struct fb_ops ps3fb_ops = {
 	.fb_compat_ioctl = ps3fb_ioctl
 	.fb_compat_ioctl = ps3fb_ioctl
 };
 };
 
 
-static struct fb_fix_screeninfo ps3fb_fix = {
+static const struct fb_fix_screeninfo ps3fb_fix = {
 	.id =		DEVICE_NAME,
 	.id =		DEVICE_NAME,
 	.type =		FB_TYPE_PACKED_PIXELS,
 	.type =		FB_TYPE_PACKED_PIXELS,
 	.visual =	FB_VISUAL_TRUECOLOR,
 	.visual =	FB_VISUAL_TRUECOLOR,

+ 2 - 2
drivers/video/fbdev/pvr2fb.c

@@ -154,7 +154,7 @@ static struct fb_fix_screeninfo pvr2_fix = {
 	.accel =	FB_ACCEL_NONE,
 	.accel =	FB_ACCEL_NONE,
 };
 };
 
 
-static struct fb_var_screeninfo pvr2_var = {
+static const struct fb_var_screeninfo pvr2_var = {
 	.xres =		640,
 	.xres =		640,
 	.yres =		480,
 	.yres =		480,
 	.xres_virtual =	640,
 	.xres_virtual =	640,
@@ -966,7 +966,7 @@ static void pvr2fb_pci_remove(struct pci_dev *pdev)
 	pci_release_regions(pdev);
 	pci_release_regions(pdev);
 }
 }
 
 
-static struct pci_device_id pvr2fb_pci_tbl[] = {
+static const struct pci_device_id pvr2fb_pci_tbl[] = {
 	{ PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NEON250,
 	{ PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NEON250,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ 0, },
 	{ 0, },

+ 2 - 2
drivers/video/fbdev/pxa3xx-gcu.c

@@ -626,8 +626,8 @@ static int pxa3xx_gcu_probe(struct platform_device *pdev)
 	/* request the IRQ */
 	/* request the IRQ */
 	irq = platform_get_irq(pdev, 0);
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
 	if (irq < 0) {
-		dev_err(dev, "no IRQ defined\n");
-		return -ENODEV;
+		dev_err(dev, "no IRQ defined: %d\n", irq);
+		return irq;
 	}
 	}
 
 
 	ret = devm_request_irq(dev, irq, pxa3xx_gcu_handle_irq,
 	ret = devm_request_irq(dev, irq, pxa3xx_gcu_handle_irq,

+ 1 - 1
drivers/video/fbdev/q40fb.c

@@ -36,7 +36,7 @@ static struct fb_fix_screeninfo q40fb_fix = {
 	.accel		= FB_ACCEL_NONE,
 	.accel		= FB_ACCEL_NONE,
 };
 };
 
 
-static struct fb_var_screeninfo q40fb_var = {
+static const struct fb_var_screeninfo q40fb_var = {
 	.xres		= 1024,
 	.xres		= 1024,
 	.yres		= 512,
 	.yres		= 512,
 	.xres_virtual	= 1024,
 	.xres_virtual	= 1024,

+ 1 - 1
drivers/video/fbdev/riva/fbdev.c

@@ -101,7 +101,7 @@ static int rivafb_blank(int blank, struct fb_info *info);
  *
  *
  * ------------------------------------------------------------------------- */
  * ------------------------------------------------------------------------- */
 
 
-static struct pci_device_id rivafb_pci_tbl[] = {
+static const struct pci_device_id rivafb_pci_tbl[] = {
 	{ PCI_VENDOR_ID_NVIDIA_SGS, PCI_DEVICE_ID_NVIDIA_SGS_RIVA128,
 	{ PCI_VENDOR_ID_NVIDIA_SGS, PCI_DEVICE_ID_NVIDIA_SGS_RIVA128,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TNT,
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TNT,

+ 1 - 1
drivers/video/fbdev/s3fb.c

@@ -1483,7 +1483,7 @@ static int s3_pci_resume(struct pci_dev* dev)
 
 
 /* List of boards that we are trying to support */
 /* List of boards that we are trying to support */
 
 
-static struct pci_device_id s3_devices[] = {
+static const struct pci_device_id s3_devices[] = {
 	{PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8810), .driver_data = CHIP_XXX_TRIO},
 	{PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8810), .driver_data = CHIP_XXX_TRIO},
 	{PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8811), .driver_data = CHIP_XXX_TRIO},
 	{PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8811), .driver_data = CHIP_XXX_TRIO},
 	{PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP},
 	{PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP},

+ 1 - 1
drivers/video/fbdev/savage/savagefb_driver.c

@@ -2429,7 +2429,7 @@ static int savagefb_resume(struct pci_dev* dev)
 }
 }
 
 
 
 
-static struct pci_device_id savagefb_devices[] = {
+static const struct pci_device_id savagefb_devices[] = {
 	{PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX128,
 	{PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX128,
 	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
 	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
 
 

+ 3 - 12
drivers/video/fbdev/sis/init301.c

@@ -6848,8 +6848,6 @@ SiS_SetGroup2(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short
 	   if(SiS_Pr->SiS_VGAHDE >= 1280) {
 	   if(SiS_Pr->SiS_VGAHDE >= 1280) {
               tempch = 20;
               tempch = 20;
               tempbx &= ~0x20;
               tempbx &= ~0x20;
-           } else if(SiS_Pr->SiS_VGAHDE >= 1024) {
-              tempch = 25;
            } else {
            } else {
 	      tempch = 25; /* OK */
 	      tempch = 25; /* OK */
 	   }
 	   }
@@ -7964,14 +7962,9 @@ SiS_SetCHTVReg(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short
             }
             }
          }
          }
       } else {						/* ---- PAL ---- */
       } else {						/* ---- PAL ---- */
-         /* We don't play around with FSCI in PAL mode */
-         if(resindex == 0x04) {
-            SiS_SetCH70xxANDOR(SiS_Pr,0x20,0x00,0xEF);	/* loop filter off */
-            SiS_SetCH70xxANDOR(SiS_Pr,0x21,0x01,0xFE);	/* ACIV on */
-         } else {
-            SiS_SetCH70xxANDOR(SiS_Pr,0x20,0x00,0xEF);	/* loop filter off */
-            SiS_SetCH70xxANDOR(SiS_Pr,0x21,0x01,0xFE);	/* ACIV on */
-         }
+	/* We don't play around with FSCI in PAL mode */
+	SiS_SetCH70xxANDOR(SiS_Pr, 0x20, 0x00, 0xEF);	/* loop filter off */
+	SiS_SetCH70xxANDOR(SiS_Pr, 0x21, 0x01, 0xFE);	/* ACIV on */
       }
       }
 
 
 #endif  /* 300 */
 #endif  /* 300 */
@@ -9657,8 +9650,6 @@ SetDelayComp(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
 	      delay = 0x0a;
 	      delay = 0x0a;
 	   } else if(IS_SIS740) {
 	   } else if(IS_SIS740) {
 	      delay = 0x00;
 	      delay = 0x00;
-	   } else if(SiS_Pr->ChipType < SIS_330) {
-	      delay = 0x0c;
 	   } else {
 	   } else {
 	      delay = 0x0c;
 	      delay = 0x0c;
 	   }
 	   }

+ 2 - 2
drivers/video/fbdev/skeletonfb.c

@@ -84,7 +84,7 @@ struct xxx_par;
  * if we don't use modedb. If we do use modedb see xxxfb_init how to use it
  * if we don't use modedb. If we do use modedb see xxxfb_init how to use it
  * to get a fb_var_screeninfo. Otherwise define a default var as well. 
  * to get a fb_var_screeninfo. Otherwise define a default var as well. 
  */
  */
-static struct fb_fix_screeninfo xxxfb_fix = {
+static const struct fb_fix_screeninfo xxxfb_fix = {
 	.id =		"FB's name", 
 	.id =		"FB's name", 
 	.type =		FB_TYPE_PACKED_PIXELS,
 	.type =		FB_TYPE_PACKED_PIXELS,
 	.visual =	FB_VISUAL_PSEUDOCOLOR,
 	.visual =	FB_VISUAL_PSEUDOCOLOR,
@@ -866,7 +866,7 @@ static int xxxfb_resume(struct pci_dev *dev)
 #define xxxfb_resume NULL
 #define xxxfb_resume NULL
 #endif /* CONFIG_PM */
 #endif /* CONFIG_PM */
 
 
-static struct pci_device_id xxxfb_id_table[] = {
+static const struct pci_device_id xxxfb_id_table[] = {
 	{ PCI_VENDOR_ID_XXX, PCI_DEVICE_ID_XXX,
 	{ PCI_VENDOR_ID_XXX, PCI_DEVICE_ID_XXX,
 	  PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
 	  PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
 	  PCI_CLASS_MASK, 0 },
 	  PCI_CLASS_MASK, 0 },

+ 1 - 1
drivers/video/fbdev/sm501fb.c

@@ -46,7 +46,7 @@
 static char *fb_mode = "640x480-16@60";
 static char *fb_mode = "640x480-16@60";
 static unsigned long default_bpp = 16;
 static unsigned long default_bpp = 16;
 
 
-static struct fb_videomode sm501_default_mode = {
+static const struct fb_videomode sm501_default_mode = {
 	.refresh	= 60,
 	.refresh	= 60,
 	.xres		= 640,
 	.xres		= 640,
 	.yres		= 480,
 	.yres		= 480,

+ 9 - 8
drivers/video/fbdev/sm712fb.c

@@ -33,8 +33,8 @@
 #include "sm712.h"
 #include "sm712.h"
 
 
 /*
 /*
-* Private structure
-*/
+ * Private structure
+ */
 struct smtcfb_info {
 struct smtcfb_info {
 	struct pci_dev *pdev;
 	struct pci_dev *pdev;
 	struct fb_info *fb;
 	struct fb_info *fb;
@@ -785,7 +785,7 @@ static void __init sm7xx_vga_setup(char *options)
 	smtc_scr_info.lfb_height = 0;
 	smtc_scr_info.lfb_height = 0;
 	smtc_scr_info.lfb_depth = 0;
 	smtc_scr_info.lfb_depth = 0;
 
 
-	pr_debug("sm7xx_vga_setup = %s\n", options);
+	pr_debug("%s = %s\n", __func__, options);
 
 
 	for (i = 0; i < ARRAY_SIZE(vesa_mode_table); i++) {
 	for (i = 0; i < ARRAY_SIZE(vesa_mode_table); i++) {
 		if (strstr(options, vesa_mode_table[i].index)) {
 		if (strstr(options, vesa_mode_table[i].index)) {
@@ -798,8 +798,8 @@ static void __init sm7xx_vga_setup(char *options)
 	}
 	}
 }
 }
 
 
-static void sm712_setpalette(int regno, unsigned red, unsigned green,
-			     unsigned blue, struct fb_info *info)
+static void sm712_setpalette(int regno, unsigned int red, unsigned int green,
+			     unsigned int blue, struct fb_info *info)
 {
 {
 	/* set bit 5:4 = 01 (write LCD RAM only) */
 	/* set bit 5:4 = 01 (write LCD RAM only) */
 	smtc_seqw(0x66, (smtc_seqr(0x66) & 0xC3) | 0x10);
 	smtc_seqw(0x66, (smtc_seqr(0x66) & 0xC3) | 0x10);
@@ -896,8 +896,9 @@ static int smtc_blank(int blank_mode, struct fb_info *info)
 	return 0;
 	return 0;
 }
 }
 
 
-static int smtc_setcolreg(unsigned regno, unsigned red, unsigned green,
-			  unsigned blue, unsigned trans, struct fb_info *info)
+static int smtc_setcolreg(unsigned int regno, unsigned int red,
+			  unsigned int green, unsigned int blue,
+			  unsigned int trans, struct fb_info *info)
 {
 {
 	struct smtcfb_info *sfb;
 	struct smtcfb_info *sfb;
 	u32 val;
 	u32 val;
@@ -1477,7 +1478,7 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
 	}
 	}
 
 
 	/* can support 32 bpp */
 	/* can support 32 bpp */
-	if (15 == sfb->fb->var.bits_per_pixel)
+	if (sfb->fb->var.bits_per_pixel == 15)
 		sfb->fb->var.bits_per_pixel = 16;
 		sfb->fb->var.bits_per_pixel = 16;
 
 
 	sfb->fb->var.xres_virtual = sfb->fb->var.xres;
 	sfb->fb->var.xres_virtual = sfb->fb->var.xres;

+ 1 - 1
drivers/video/fbdev/smscufx.c

@@ -122,7 +122,7 @@ static const u32 smscufx_info_flags = FBINFO_DEFAULT | FBINFO_READS_FAST |
 	FBINFO_VIRTFB |	FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT |
 	FBINFO_VIRTFB |	FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT |
 	FBINFO_HWACCEL_COPYAREA | FBINFO_MISC_ALWAYS_SETPAR;
 	FBINFO_HWACCEL_COPYAREA | FBINFO_MISC_ALWAYS_SETPAR;
 
 
-static struct usb_device_id id_table[] = {
+static const struct usb_device_id id_table[] = {
 	{USB_DEVICE(0x0424, 0x9d00),},
 	{USB_DEVICE(0x0424, 0x9d00),},
 	{USB_DEVICE(0x0424, 0x9d01),},
 	{USB_DEVICE(0x0424, 0x9d01),},
 	{},
 	{},

+ 5 - 5
drivers/video/fbdev/sunxvr1000.c

@@ -33,8 +33,8 @@ static int gfb_get_props(struct gfb_info *gp)
 	gp->depth = of_getintprop_default(gp->of_node, "depth", 32);
 	gp->depth = of_getintprop_default(gp->of_node, "depth", 32);
 
 
 	if (!gp->width || !gp->height) {
 	if (!gp->width || !gp->height) {
-		printk(KERN_ERR "gfb: Critical properties missing for %s\n",
-		       gp->of_node->full_name);
+		printk(KERN_ERR "gfb: Critical properties missing for %pOF\n",
+		       gp->of_node);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
@@ -151,12 +151,12 @@ static int gfb_probe(struct platform_device *op)
 	if (err)
 	if (err)
 		goto err_unmap_fb;
 		goto err_unmap_fb;
 
 
-	printk("gfb: Found device at %s\n", dp->full_name);
+	printk("gfb: Found device at %pOF\n", dp);
 
 
 	err = register_framebuffer(info);
 	err = register_framebuffer(info);
 	if (err < 0) {
 	if (err < 0) {
-		printk(KERN_ERR "gfb: Could not register framebuffer %s\n",
-		       dp->full_name);
+		printk(KERN_ERR "gfb: Could not register framebuffer %pOF\n",
+		       dp);
 		goto err_unmap_fb;
 		goto err_unmap_fb;
 	}
 	}
 
 

+ 1 - 1
drivers/video/fbdev/sunxvr2500.c

@@ -220,7 +220,7 @@ err_out:
 	return err;
 	return err;
 }
 }
 
 
-static struct pci_device_id s3d_pci_table[] = {
+static const struct pci_device_id s3d_pci_table[] = {
 	{	PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002c),	},
 	{	PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002c),	},
 	{	PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002d),	},
 	{	PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002d),	},
 	{	PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002e),	},
 	{	PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002e),	},

+ 1 - 1
drivers/video/fbdev/sunxvr500.c

@@ -393,7 +393,7 @@ err_out:
 	return err;
 	return err;
 }
 }
 
 
-static struct pci_device_id e3d_pci_table[] = {
+static const struct pci_device_id e3d_pci_table[] = {
 	{	PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a0),	},
 	{	PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a0),	},
 	{	PCI_DEVICE(0x1091, 0x7a0),			},
 	{	PCI_DEVICE(0x1091, 0x7a0),			},
 	{	PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a2),	},
 	{	PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a2),	},

+ 2 - 2
drivers/video/fbdev/tcx.c

@@ -467,8 +467,8 @@ static int tcx_probe(struct platform_device *op)
 
 
 	dev_set_drvdata(&op->dev, info);
 	dev_set_drvdata(&op->dev, info);
 
 
-	printk(KERN_INFO "%s: TCX at %lx:%lx, %s\n",
-	       dp->full_name,
+	printk(KERN_INFO "%pOF: TCX at %lx:%lx, %s\n",
+	       dp,
 	       par->which_io,
 	       par->which_io,
 	       info->fix.smem_start,
 	       info->fix.smem_start,
 	       par->lowdepth ? "8-bit only" : "24-bit depth");
 	       par->lowdepth ? "8-bit only" : "24-bit depth");

+ 1 - 1
drivers/video/fbdev/tdfxfb.c

@@ -120,7 +120,7 @@ static const struct fb_var_screeninfo tdfx_var = {
 static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id);
 static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id);
 static void tdfxfb_remove(struct pci_dev *pdev);
 static void tdfxfb_remove(struct pci_dev *pdev);
 
 
-static struct pci_device_id tdfxfb_id_table[] = {
+static const struct pci_device_id tdfxfb_id_table[] = {
 	{ PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE,
 	{ PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE,
 	  PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
 	  PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
 	  0xff0000, 0 },
 	  0xff0000, 0 },

+ 1 - 1
drivers/video/fbdev/tridentfb.c

@@ -1737,7 +1737,7 @@ static void trident_pci_remove(struct pci_dev *dev)
 }
 }
 
 
 /* List of boards that we are trying to support */
 /* List of boards that we are trying to support */
-static struct pci_device_id trident_devices[] = {
+static const struct pci_device_id trident_devices[] = {
 	{PCI_VENDOR_ID_TRIDENT,	BLADE3D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{PCI_VENDOR_ID_TRIDENT,	BLADE3D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{PCI_VENDOR_ID_TRIDENT,	CYBERBLADEi7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{PCI_VENDOR_ID_TRIDENT,	CYBERBLADEi7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{PCI_VENDOR_ID_TRIDENT,	CYBERBLADEi7D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{PCI_VENDOR_ID_TRIDENT,	CYBERBLADEi7D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},

+ 2 - 3
drivers/video/fbdev/udlfb.c

@@ -54,7 +54,7 @@ static const u32 udlfb_info_flags = FBINFO_DEFAULT | FBINFO_READS_FAST |
  * which is compatible with all known USB 2.0 era graphics chips and firmware,
  * which is compatible with all known USB 2.0 era graphics chips and firmware,
  * but allows DisplayLink to increment those for any future incompatible chips
  * but allows DisplayLink to increment those for any future incompatible chips
  */
  */
-static struct usb_device_id id_table[] = {
+static const struct usb_device_id id_table[] = {
 	{.idVendor = 0x17e9,
 	{.idVendor = 0x17e9,
 	 .bInterfaceClass = 0xff,
 	 .bInterfaceClass = 0xff,
 	 .bInterfaceSubClass = 0x00,
 	 .bInterfaceSubClass = 0x00,
@@ -1465,7 +1465,7 @@ static ssize_t metrics_reset_store(struct device *fbdev,
 	return count;
 	return count;
 }
 }
 
 
-static struct bin_attribute edid_attr = {
+static const struct bin_attribute edid_attr = {
 	.attr.name = "edid",
 	.attr.name = "edid",
 	.attr.mode = 0666,
 	.attr.mode = 0666,
 	.size = EDID_LENGTH,
 	.size = EDID_LENGTH,
@@ -1655,7 +1655,6 @@ static int dlfb_usb_probe(struct usb_interface *interface,
 error:
 error:
 	if (dev) {
 	if (dev) {
 
 
-		kref_put(&dev->kref, dlfb_free); /* ref for framebuffer */
 		kref_put(&dev->kref, dlfb_free); /* last ref from kref_init */
 		kref_put(&dev->kref, dlfb_free); /* last ref from kref_init */
 
 
 		/* dev has been deallocated. Do not dereference */
 		/* dev has been deallocated. Do not dereference */

+ 1 - 1
drivers/video/fbdev/uvesafb.c

@@ -1666,7 +1666,7 @@ static struct attribute *uvesafb_dev_attrs[] = {
 	NULL,
 	NULL,
 };
 };
 
 
-static struct attribute_group uvesafb_dev_attgrp = {
+static const struct attribute_group uvesafb_dev_attgrp = {
 	.name = NULL,
 	.name = NULL,
 	.attrs = uvesafb_dev_attrs,
 	.attrs = uvesafb_dev_attrs,
 };
 };

+ 2 - 2
drivers/video/fbdev/vermilion/vermilion.c

@@ -55,7 +55,7 @@ static struct list_head global_has_mode;
 static struct fb_ops vmlfb_ops;
 static struct fb_ops vmlfb_ops;
 static struct vml_sys *subsys = NULL;
 static struct vml_sys *subsys = NULL;
 static char *vml_default_mode = "1024x768@60";
 static char *vml_default_mode = "1024x768@60";
-static struct fb_videomode defaultmode = {
+static const struct fb_videomode defaultmode = {
 	NULL, 60, 1024, 768, 12896, 144, 24, 29, 3, 136, 6,
 	NULL, 60, 1024, 768, 12896, 144, 24, 29, 3, 136, 6,
 	0, FB_VMODE_NONINTERLACED
 	0, FB_VMODE_NONINTERLACED
 };
 };
@@ -1044,7 +1044,7 @@ static struct fb_ops vmlfb_ops = {
 	.fb_setcolreg = vmlfb_setcolreg
 	.fb_setcolreg = vmlfb_setcolreg
 };
 };
 
 
-static struct pci_device_id vml_ids[] = {
+static const struct pci_device_id vml_ids[] = {
 	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, VML_DEVICE_VDC)},
 	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, VML_DEVICE_VDC)},
 	{0}
 	{0}
 };
 };

+ 1 - 1
drivers/video/fbdev/via/via-core.c

@@ -724,7 +724,7 @@ static void via_pci_remove(struct pci_dev *pdev)
 }
 }
 
 
 
 
-static struct pci_device_id via_pci_table[] = {
+static const struct pci_device_id via_pci_table[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_CLE266_DID),
 	{ PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_CLE266_DID),
 	  .driver_data = UNICHROME_CLE266 },
 	  .driver_data = UNICHROME_CLE266 },
 	{ PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_K400_DID),
 	{ PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_K400_DID),

+ 2 - 2
drivers/video/fbdev/vt8623fb.c

@@ -81,7 +81,7 @@ static struct vga_regset vt8623_line_compare_regs[]  = {{0x18, 0, 7}, {0x07, 4,
 static struct vga_regset vt8623_fetch_count_regs[]   = {{0x1C, 0, 7}, {0x1D, 0, 1}, VGA_REGSET_END};
 static struct vga_regset vt8623_fetch_count_regs[]   = {{0x1C, 0, 7}, {0x1D, 0, 1}, VGA_REGSET_END};
 static struct vga_regset vt8623_start_address_regs[] = {{0x0d, 0, 7}, {0x0c, 0, 7}, {0x34, 0, 7}, {0x48, 0, 1}, VGA_REGSET_END};
 static struct vga_regset vt8623_start_address_regs[] = {{0x0d, 0, 7}, {0x0c, 0, 7}, {0x34, 0, 7}, {0x48, 0, 1}, VGA_REGSET_END};
 
 
-static struct svga_timing_regs vt8623_timing_regs     = {
+static const struct svga_timing_regs vt8623_timing_regs     = {
 	vt8623_h_total_regs, vt8623_h_display_regs, vt8623_h_blank_start_regs,
 	vt8623_h_total_regs, vt8623_h_display_regs, vt8623_h_blank_start_regs,
 	vt8623_h_blank_end_regs, vt8623_h_sync_start_regs, vt8623_h_sync_end_regs,
 	vt8623_h_blank_end_regs, vt8623_h_sync_start_regs, vt8623_h_sync_end_regs,
 	vt8623_v_total_regs, vt8623_v_display_regs, vt8623_v_blank_start_regs,
 	vt8623_v_total_regs, vt8623_v_display_regs, vt8623_v_blank_start_regs,
@@ -888,7 +888,7 @@ fail:
 
 
 /* List of boards that we are trying to support */
 /* List of boards that we are trying to support */
 
 
-static struct pci_device_id vt8623_devices[] = {
+static const struct pci_device_id vt8623_devices[] = {
 	{PCI_DEVICE(PCI_VENDOR_ID_VIA, 0x3122)},
 	{PCI_DEVICE(PCI_VENDOR_ID_VIA, 0x3122)},
 	{0, 0, 0, 0, 0, 0, 0}
 	{0, 0, 0, 0, 0, 0, 0}
 };
 };

+ 31 - 31
drivers/video/fbdev/xilinxfb.c

@@ -41,7 +41,6 @@
 
 
 #define DRIVER_NAME		"xilinxfb"
 #define DRIVER_NAME		"xilinxfb"
 
 
-
 /*
 /*
  * Xilinx calls it "TFT LCD Controller" though it can also be used for
  * Xilinx calls it "TFT LCD Controller" though it can also be used for
  * the VGA port on the Xilinx ML40x board. This is a hardware display
  * the VGA port on the Xilinx ML40x board. This is a hardware display
@@ -92,15 +91,16 @@ struct xilinxfb_platform_data {
 	u32 xvirt, yvirt;       /* resolution of memory buffer */
 	u32 xvirt, yvirt;       /* resolution of memory buffer */
 
 
 	/* Physical address of framebuffer memory; If non-zero, driver
 	/* Physical address of framebuffer memory; If non-zero, driver
-	* will use provided memory address instead of allocating one from
-	* the consistent pool. */
+	 * will use provided memory address instead of allocating one from
+	 * the consistent pool.
+	 */
 	u32 fb_phys;
 	u32 fb_phys;
 };
 };
 
 
 /*
 /*
  * Default xilinxfb configuration
  * Default xilinxfb configuration
  */
  */
-static struct xilinxfb_platform_data xilinx_fb_default_pdata = {
+static const struct xilinxfb_platform_data xilinx_fb_default_pdata = {
 	.xres = 640,
 	.xres = 640,
 	.yres = 480,
 	.yres = 480,
 	.xvirt = 1024,
 	.xvirt = 1024,
@@ -110,14 +110,14 @@ static struct xilinxfb_platform_data xilinx_fb_default_pdata = {
 /*
 /*
  * Here are the default fb_fix_screeninfo and fb_var_screeninfo structures
  * Here are the default fb_fix_screeninfo and fb_var_screeninfo structures
  */
  */
-static struct fb_fix_screeninfo xilinx_fb_fix = {
+static const struct fb_fix_screeninfo xilinx_fb_fix = {
 	.id =		"Xilinx",
 	.id =		"Xilinx",
 	.type =		FB_TYPE_PACKED_PIXELS,
 	.type =		FB_TYPE_PACKED_PIXELS,
 	.visual =	FB_VISUAL_TRUECOLOR,
 	.visual =	FB_VISUAL_TRUECOLOR,
 	.accel =	FB_ACCEL_NONE
 	.accel =	FB_ACCEL_NONE
 };
 };
 
 
-static struct fb_var_screeninfo xilinx_fb_var = {
+static const struct fb_var_screeninfo xilinx_fb_var = {
 	.bits_per_pixel =	BITS_PER_PIXEL,
 	.bits_per_pixel =	BITS_PER_PIXEL,
 
 
 	.red =		{ RED_SHIFT, 8, 0 },
 	.red =		{ RED_SHIFT, 8, 0 },
@@ -128,18 +128,18 @@ static struct fb_var_screeninfo xilinx_fb_var = {
 	.activate =	FB_ACTIVATE_NOW
 	.activate =	FB_ACTIVATE_NOW
 };
 };
 
 
-
 #define BUS_ACCESS_FLAG		0x1 /* 1 = BUS, 0 = DCR */
 #define BUS_ACCESS_FLAG		0x1 /* 1 = BUS, 0 = DCR */
 #define LITTLE_ENDIAN_ACCESS	0x2 /* LITTLE ENDIAN IO functions */
 #define LITTLE_ENDIAN_ACCESS	0x2 /* LITTLE ENDIAN IO functions */
 
 
 struct xilinxfb_drvdata {
 struct xilinxfb_drvdata {
-
 	struct fb_info	info;		/* FB driver info record */
 	struct fb_info	info;		/* FB driver info record */
 
 
 	phys_addr_t	regs_phys;	/* phys. address of the control
 	phys_addr_t	regs_phys;	/* phys. address of the control
-						registers */
+					 * registers
+					 */
 	void __iomem	*regs;		/* virt. address of the control
 	void __iomem	*regs;		/* virt. address of the control
-						registers */
+					 * registers
+					 */
 #ifdef CONFIG_PPC_DCR
 #ifdef CONFIG_PPC_DCR
 	dcr_host_t      dcr_host;
 	dcr_host_t      dcr_host;
 	unsigned int    dcr_len;
 	unsigned int    dcr_len;
@@ -148,7 +148,7 @@ struct xilinxfb_drvdata {
 	dma_addr_t	fb_phys;	/* phys. address of the frame buffer */
 	dma_addr_t	fb_phys;	/* phys. address of the frame buffer */
 	int		fb_alloced;	/* Flag, was the fb memory alloced? */
 	int		fb_alloced;	/* Flag, was the fb memory alloced? */
 
 
-	u8 		flags;		/* features of the driver */
+	u8		flags;		/* features of the driver */
 
 
 	u32		reg_ctrl_default;
 	u32		reg_ctrl_default;
 
 
@@ -165,7 +165,7 @@ struct xilinxfb_drvdata {
  * which bus its connected and call the appropriate write API.
  * which bus its connected and call the appropriate write API.
  */
  */
 static void xilinx_fb_out32(struct xilinxfb_drvdata *drvdata, u32 offset,
 static void xilinx_fb_out32(struct xilinxfb_drvdata *drvdata, u32 offset,
-				u32 val)
+			    u32 val)
 {
 {
 	if (drvdata->flags & BUS_ACCESS_FLAG) {
 	if (drvdata->flags & BUS_ACCESS_FLAG) {
 		if (drvdata->flags & LITTLE_ENDIAN_ACCESS)
 		if (drvdata->flags & LITTLE_ENDIAN_ACCESS)
@@ -195,8 +195,8 @@ static u32 xilinx_fb_in32(struct xilinxfb_drvdata *drvdata, u32 offset)
 }
 }
 
 
 static int
 static int
-xilinx_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue,
-	unsigned transp, struct fb_info *fbi)
+xilinx_fb_setcolreg(unsigned int regno, unsigned int red, unsigned int green,
+		    unsigned int blue, unsigned int transp, struct fb_info *fbi)
 {
 {
 	u32 *palette = fbi->pseudo_palette;
 	u32 *palette = fbi->pseudo_palette;
 
 
@@ -205,9 +205,11 @@ xilinx_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue,
 
 
 	if (fbi->var.grayscale) {
 	if (fbi->var.grayscale) {
 		/* Convert color to grayscale.
 		/* Convert color to grayscale.
-		 * grayscale = 0.30*R + 0.59*G + 0.11*B */
-		red = green = blue =
-			(red * 77 + green * 151 + blue * 28 + 127) >> 8;
+		 * grayscale = 0.30*R + 0.59*G + 0.11*B
+		 */
+		blue = (red * 77 + green * 151 + blue * 28 + 127) >> 8;
+		green = blue;
+		red = green;
 	}
 	}
 
 
 	/* fbi->fix.visual is always FB_VISUAL_TRUECOLOR */
 	/* fbi->fix.visual is always FB_VISUAL_TRUECOLOR */
@@ -241,13 +243,11 @@ xilinx_fb_blank(int blank_mode, struct fb_info *fbi)
 		xilinx_fb_out32(drvdata, REG_CTRL, 0);
 		xilinx_fb_out32(drvdata, REG_CTRL, 0);
 	default:
 	default:
 		break;
 		break;
-
 	}
 	}
 	return 0; /* success */
 	return 0; /* success */
 }
 }
 
 
-static struct fb_ops xilinxfb_ops =
-{
+static struct fb_ops xilinxfb_ops = {
 	.owner			= THIS_MODULE,
 	.owner			= THIS_MODULE,
 	.fb_setcolreg		= xilinx_fb_setcolreg,
 	.fb_setcolreg		= xilinx_fb_setcolreg,
 	.fb_blank		= xilinx_fb_blank,
 	.fb_blank		= xilinx_fb_blank,
@@ -286,7 +286,8 @@ static int xilinxfb_assign(struct platform_device *pdev,
 	} else {
 	} else {
 		drvdata->fb_alloced = 1;
 		drvdata->fb_alloced = 1;
 		drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(fbsize),
 		drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(fbsize),
-					&drvdata->fb_phys, GFP_KERNEL);
+						      &drvdata->fb_phys,
+						      GFP_KERNEL);
 	}
 	}
 
 
 	if (!drvdata->fb_virt) {
 	if (!drvdata->fb_virt) {
@@ -300,7 +301,7 @@ static int xilinxfb_assign(struct platform_device *pdev,
 	/* Tell the hardware where the frame buffer is */
 	/* Tell the hardware where the frame buffer is */
 	xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys);
 	xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys);
 	rc = xilinx_fb_in32(drvdata, REG_FB_ADDR);
 	rc = xilinx_fb_in32(drvdata, REG_FB_ADDR);
-	/* Endianess detection */
+	/* Endianness detection */
 	if (rc != drvdata->fb_phys) {
 	if (rc != drvdata->fb_phys) {
 		drvdata->flags |= LITTLE_ENDIAN_ACCESS;
 		drvdata->flags |= LITTLE_ENDIAN_ACCESS;
 		xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys);
 		xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys);
@@ -310,8 +311,7 @@ static int xilinxfb_assign(struct platform_device *pdev,
 	drvdata->reg_ctrl_default = REG_CTRL_ENABLE;
 	drvdata->reg_ctrl_default = REG_CTRL_ENABLE;
 	if (pdata->rotate_screen)
 	if (pdata->rotate_screen)
 		drvdata->reg_ctrl_default |= REG_CTRL_ROTATE;
 		drvdata->reg_ctrl_default |= REG_CTRL_ROTATE;
-	xilinx_fb_out32(drvdata, REG_CTRL,
-					drvdata->reg_ctrl_default);
+	xilinx_fb_out32(drvdata, REG_CTRL, drvdata->reg_ctrl_default);
 
 
 	/* Fill struct fb_info */
 	/* Fill struct fb_info */
 	drvdata->info.device = dev;
 	drvdata->info.device = dev;
@@ -364,7 +364,7 @@ err_regfb:
 err_cmap:
 err_cmap:
 	if (drvdata->fb_alloced)
 	if (drvdata->fb_alloced)
 		dma_free_coherent(dev, PAGE_ALIGN(fbsize), drvdata->fb_virt,
 		dma_free_coherent(dev, PAGE_ALIGN(fbsize), drvdata->fb_virt,
-			drvdata->fb_phys);
+				  drvdata->fb_phys);
 	else
 	else
 		iounmap(drvdata->fb_virt);
 		iounmap(drvdata->fb_virt);
 
 
@@ -435,12 +435,12 @@ static int xilinxfb_of_probe(struct platform_device *pdev)
 	 * Fill the resource structure if its direct BUS interface
 	 * Fill the resource structure if its direct BUS interface
 	 * otherwise fill the dcr_host structure.
 	 * otherwise fill the dcr_host structure.
 	 */
 	 */
-	if (tft_access) {
+	if (tft_access)
 		drvdata->flags |= BUS_ACCESS_FLAG;
 		drvdata->flags |= BUS_ACCESS_FLAG;
-	}
 #ifdef CONFIG_PPC_DCR
 #ifdef CONFIG_PPC_DCR
 	else {
 	else {
 		int start;
 		int start;
+
 		start = dcr_resource_start(pdev->dev.of_node, 0);
 		start = dcr_resource_start(pdev->dev.of_node, 0);
 		drvdata->dcr_len = dcr_resource_len(pdev->dev.of_node, 0);
 		drvdata->dcr_len = dcr_resource_len(pdev->dev.of_node, 0);
 		drvdata->dcr_host = dcr_map(pdev->dev.of_node, start, drvdata->dcr_len);
 		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)
 #endif
 #endif
 
 
 	prop = of_get_property(pdev->dev.of_node, "phys-size", &size);
 	prop = of_get_property(pdev->dev.of_node, "phys-size", &size);
-	if ((prop) && (size >= sizeof(u32)*2)) {
+	if ((prop) && (size >= sizeof(u32) * 2)) {
 		pdata.screen_width_mm = prop[0];
 		pdata.screen_width_mm = prop[0];
 		pdata.screen_height_mm = prop[1];
 		pdata.screen_height_mm = prop[1];
 	}
 	}
 
 
 	prop = of_get_property(pdev->dev.of_node, "resolution", &size);
 	prop = of_get_property(pdev->dev.of_node, "resolution", &size);
-	if ((prop) && (size >= sizeof(u32)*2)) {
+	if ((prop) && (size >= sizeof(u32) * 2)) {
 		pdata.xres = prop[0];
 		pdata.xres = prop[0];
 		pdata.yres = prop[1];
 		pdata.yres = prop[1];
 	}
 	}
 
 
 	prop = of_get_property(pdev->dev.of_node, "virtual-resolution", &size);
 	prop = of_get_property(pdev->dev.of_node, "virtual-resolution", &size);
-	if ((prop) && (size >= sizeof(u32)*2)) {
+	if ((prop) && (size >= sizeof(u32) * 2)) {
 		pdata.xvirt = prop[0];
 		pdata.xvirt = prop[0];
 		pdata.yvirt = prop[1];
 		pdata.yvirt = prop[1];
 	}
 	}
@@ -482,7 +482,7 @@ static int xilinxfb_of_remove(struct platform_device *op)
 }
 }
 
 
 /* Match table for of_platform binding */
 /* Match table for of_platform binding */
-static struct of_device_id xilinxfb_of_match[] = {
+static const struct of_device_id xilinxfb_of_match[] = {
 	{ .compatible = "xlnx,xps-tft-1.00.a", },
 	{ .compatible = "xlnx,xps-tft-1.00.a", },
 	{ .compatible = "xlnx,xps-tft-2.00.a", },
 	{ .compatible = "xlnx,xps-tft-2.00.a", },
 	{ .compatible = "xlnx,xps-tft-2.01.a", },
 	{ .compatible = "xlnx,xps-tft-2.01.a", },

+ 16 - 25
drivers/video/of_display_timing.c

@@ -31,8 +31,7 @@ static int parse_timing_property(const struct device_node *np, const char *name,
 
 
 	prop = of_find_property(np, name, &length);
 	prop = of_find_property(np, name, &length);
 	if (!prop) {
 	if (!prop) {
-		pr_err("%s: could not find property %s\n",
-			of_node_full_name(np), name);
+		pr_err("%pOF: could not find property %s\n", np, name);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
@@ -44,8 +43,7 @@ static int parse_timing_property(const struct device_node *np, const char *name,
 	} else if (cells == 3) {
 	} else if (cells == 3) {
 		ret = of_property_read_u32_array(np, name, &result->min, cells);
 		ret = of_property_read_u32_array(np, name, &result->min, cells);
 	} else {
 	} else {
-		pr_err("%s: illegal timing specification in %s\n",
-			of_node_full_name(np), name);
+		pr_err("%pOF: illegal timing specification in %s\n", np, name);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
@@ -105,8 +103,7 @@ static int of_parse_display_timing(const struct device_node *np,
 		dt->flags |= DISPLAY_FLAGS_DOUBLECLK;
 		dt->flags |= DISPLAY_FLAGS_DOUBLECLK;
 
 
 	if (ret) {
 	if (ret) {
-		pr_err("%s: error reading timing properties\n",
-			of_node_full_name(np));
+		pr_err("%pOF: error reading timing properties\n", np);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
@@ -129,8 +126,7 @@ int of_get_display_timing(const struct device_node *np, const char *name,
 
 
 	timing_np = of_get_child_by_name(np, name);
 	timing_np = of_get_child_by_name(np, name);
 	if (!timing_np) {
 	if (!timing_np) {
-		pr_err("%s: could not find node '%s'\n",
-			of_node_full_name(np), name);
+		pr_err("%pOF: could not find node '%s'\n", np, name);
 		return -ENOENT;
 		return -ENOENT;
 	}
 	}
 
 
@@ -154,15 +150,13 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
 
 
 	timings_np = of_get_child_by_name(np, "display-timings");
 	timings_np = of_get_child_by_name(np, "display-timings");
 	if (!timings_np) {
 	if (!timings_np) {
-		pr_err("%s: could not find display-timings node\n",
-			of_node_full_name(np));
+		pr_err("%pOF: could not find display-timings node\n", np);
 		return NULL;
 		return NULL;
 	}
 	}
 
 
 	disp = kzalloc(sizeof(*disp), GFP_KERNEL);
 	disp = kzalloc(sizeof(*disp), GFP_KERNEL);
 	if (!disp) {
 	if (!disp) {
-		pr_err("%s: could not allocate struct disp'\n",
-			of_node_full_name(np));
+		pr_err("%pOF: could not allocate struct disp'\n", np);
 		goto dispfail;
 		goto dispfail;
 	}
 	}
 
 
@@ -172,28 +166,25 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
 		entry = of_get_next_child(timings_np, NULL);
 		entry = of_get_next_child(timings_np, NULL);
 	/* if there is no child, it is useless to go on */
 	/* if there is no child, it is useless to go on */
 	if (!entry) {
 	if (!entry) {
-		pr_err("%s: no timing specifications given\n",
-			of_node_full_name(np));
+		pr_err("%pOF: no timing specifications given\n", np);
 		goto entryfail;
 		goto entryfail;
 	}
 	}
 
 
-	pr_debug("%s: using %s as default timing\n",
-		of_node_full_name(np), entry->name);
+	pr_debug("%pOF: using %s as default timing\n", np, entry->name);
 
 
 	native_mode = entry;
 	native_mode = entry;
 
 
 	disp->num_timings = of_get_child_count(timings_np);
 	disp->num_timings = of_get_child_count(timings_np);
 	if (disp->num_timings == 0) {
 	if (disp->num_timings == 0) {
 		/* should never happen, as entry was already found above */
 		/* should never happen, as entry was already found above */
-		pr_err("%s: no timings specified\n", of_node_full_name(np));
+		pr_err("%pOF: no timings specified\n", np);
 		goto entryfail;
 		goto entryfail;
 	}
 	}
 
 
 	disp->timings = kzalloc(sizeof(struct display_timing *) *
 	disp->timings = kzalloc(sizeof(struct display_timing *) *
 				disp->num_timings, GFP_KERNEL);
 				disp->num_timings, GFP_KERNEL);
 	if (!disp->timings) {
 	if (!disp->timings) {
-		pr_err("%s: could not allocate timings array\n",
-			of_node_full_name(np));
+		pr_err("%pOF: could not allocate timings array\n", np);
 		goto entryfail;
 		goto entryfail;
 	}
 	}
 
 
@@ -206,8 +197,8 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
 
 
 		dt = kzalloc(sizeof(*dt), GFP_KERNEL);
 		dt = kzalloc(sizeof(*dt), GFP_KERNEL);
 		if (!dt) {
 		if (!dt) {
-			pr_err("%s: could not allocate display_timing struct\n",
-					of_node_full_name(np));
+			pr_err("%pOF: could not allocate display_timing struct\n",
+				np);
 			goto timingfail;
 			goto timingfail;
 		}
 		}
 
 
@@ -217,8 +208,8 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
 			 * to not encourage wrong devicetrees, fail in case of
 			 * to not encourage wrong devicetrees, fail in case of
 			 * an error
 			 * an error
 			 */
 			 */
-			pr_err("%s: error in timing %d\n",
-				of_node_full_name(np), disp->num_timings + 1);
+			pr_err("%pOF: error in timing %d\n",
+				np, disp->num_timings + 1);
 			kfree(dt);
 			kfree(dt);
 			goto timingfail;
 			goto timingfail;
 		}
 		}
@@ -236,8 +227,8 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
 	 */
 	 */
 	of_node_put(native_mode);
 	of_node_put(native_mode);
 
 
-	pr_debug("%s: got %d timings. Using timing #%d as default\n",
-		of_node_full_name(np), disp->num_timings,
+	pr_debug("%pOF: got %d timings. Using timing #%d as default\n",
+		np, disp->num_timings,
 		disp->native_mode + 1);
 		disp->native_mode + 1);
 
 
 	return disp;
 	return disp;

+ 1 - 1
drivers/video/of_videomode.c

@@ -36,7 +36,7 @@ int of_get_videomode(struct device_node *np, struct videomode *vm,
 
 
 	disp = of_get_display_timings(np);
 	disp = of_get_display_timings(np);
 	if (!disp) {
 	if (!disp) {
-		pr_err("%s: no timings specified\n", of_node_full_name(np));
+		pr_err("%pOF: no timings specified\n", np);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 

+ 1 - 9
include/linux/fb.h

@@ -400,7 +400,7 @@ struct fb_tile_ops {
 #endif /* CONFIG_FB_TILEBLITTING */
 #endif /* CONFIG_FB_TILEBLITTING */
 
 
 /* FBINFO_* = fb_info.flags bit flags */
 /* FBINFO_* = fb_info.flags bit flags */
-#define FBINFO_MODULE		0x0001	/* Low-level driver is a module */
+#define FBINFO_DEFAULT		0
 #define FBINFO_HWACCEL_DISABLED	0x0002
 #define FBINFO_HWACCEL_DISABLED	0x0002
 	/* When FBINFO_HWACCEL_DISABLED is set:
 	/* When FBINFO_HWACCEL_DISABLED is set:
 	 *  Hardware acceleration is turned off.  Software implementations
 	 *  Hardware acceleration is turned off.  Software implementations
@@ -533,14 +533,6 @@ static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
 	return a;
 	return a;
 }
 }
 
 
-#ifdef MODULE
-#define FBINFO_DEFAULT	FBINFO_MODULE
-#else
-#define FBINFO_DEFAULT	0
-#endif
-
-// This will go away
-#define FBINFO_FLAG_MODULE	FBINFO_MODULE
 #define FBINFO_FLAG_DEFAULT	FBINFO_DEFAULT
 #define FBINFO_FLAG_DEFAULT	FBINFO_DEFAULT
 
 
 /* This will go away
 /* This will go away

+ 12 - 0
include/linux/fbcon.h

@@ -0,0 +1,12 @@
+#ifndef _LINUX_FBCON_H
+#define _LINUX_FBCON_H
+
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE
+void __init fb_console_init(void);
+void __exit fb_console_exit(void);
+#else
+static inline void fb_console_init(void) {}
+static inline void fb_console_exit(void) {}
+#endif
+
+#endif /* _LINUX_FBCON_H */