Merge tag 'fbdev-v4.14' of git://github.com/bzolnier/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Sep 2017 20:33:33 +0000 (13:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Sep 2017 20:33:33 +0000 (13:33 -0700)
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.
  ...

94 files changed:
Documentation/fb/fbcon.txt
drivers/video/console/Kconfig
drivers/video/console/Makefile
drivers/video/console/vgacon.c
drivers/video/fbdev/68328fb.c
drivers/video/fbdev/Kconfig
drivers/video/fbdev/amba-clcd.c
drivers/video/fbdev/arkfb.c
drivers/video/fbdev/asiliantfb.c
drivers/video/fbdev/atmel_lcdfb.c
drivers/video/fbdev/aty/aty128fb.c
drivers/video/fbdev/aty/atyfb_base.c
drivers/video/fbdev/aty/radeon_base.c
drivers/video/fbdev/bfin-lq035q1-fb.c
drivers/video/fbdev/bw2.c
drivers/video/fbdev/cg14.c
drivers/video/fbdev/cg3.c
drivers/video/fbdev/cg6.c
drivers/video/fbdev/chipsfb.c
drivers/video/fbdev/cobalt_lcdfb.c
drivers/video/fbdev/core/Makefile
drivers/video/fbdev/core/bitblit.c [moved from drivers/video/console/bitblit.c with 98% similarity]
drivers/video/fbdev/core/fbcon.c [moved from drivers/video/console/fbcon.c with 99% similarity]
drivers/video/fbdev/core/fbcon.h [moved from drivers/video/console/fbcon.h with 97% similarity]
drivers/video/fbdev/core/fbcon_ccw.c [moved from drivers/video/console/fbcon_ccw.c with 98% similarity]
drivers/video/fbdev/core/fbcon_cw.c [moved from drivers/video/console/fbcon_cw.c with 98% similarity]
drivers/video/fbdev/core/fbcon_dmi_quirks.c [new file with mode: 0644]
drivers/video/fbdev/core/fbcon_rotate.c [moved from drivers/video/console/fbcon_rotate.c with 95% similarity]
drivers/video/fbdev/core/fbcon_rotate.h [moved from drivers/video/console/fbcon_rotate.h with 100% similarity]
drivers/video/fbdev/core/fbcon_ud.c [moved from drivers/video/console/fbcon_ud.c with 98% similarity]
drivers/video/fbdev/core/fbmem.c
drivers/video/fbdev/core/fbmon.c
drivers/video/fbdev/core/softcursor.c [moved from drivers/video/console/softcursor.c with 93% similarity]
drivers/video/fbdev/core/tileblit.c [moved from drivers/video/console/tileblit.c with 96% similarity]
drivers/video/fbdev/cyber2000fb.c
drivers/video/fbdev/da8xx-fb.c
drivers/video/fbdev/dnfb.c
drivers/video/fbdev/fb-puv3.c
drivers/video/fbdev/ffb.c
drivers/video/fbdev/fm2fb.c
drivers/video/fbdev/geode/gxfb_core.c
drivers/video/fbdev/grvga.c
drivers/video/fbdev/i810/i810_main.c
drivers/video/fbdev/imsttfb.c
drivers/video/fbdev/intelfb/intelfbdrv.c
drivers/video/fbdev/kyro/fbdev.c
drivers/video/fbdev/leo.c
drivers/video/fbdev/matrox/matroxfb_base.c
drivers/video/fbdev/maxinefb.c
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
drivers/video/fbdev/mbx/mbxfb.c
drivers/video/fbdev/neofb.c
drivers/video/fbdev/nvidia/nvidia.c
drivers/video/fbdev/offb.c
drivers/video/fbdev/omap/lcd_mipid.c
drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c
drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c
drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c
drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
drivers/video/fbdev/p9100.c
drivers/video/fbdev/pm2fb.c
drivers/video/fbdev/pm3fb.c
drivers/video/fbdev/pmag-aa-fb.c
drivers/video/fbdev/pmag-ba-fb.c
drivers/video/fbdev/pmagb-b-fb.c
drivers/video/fbdev/ps3fb.c
drivers/video/fbdev/pvr2fb.c
drivers/video/fbdev/pxa3xx-gcu.c
drivers/video/fbdev/q40fb.c
drivers/video/fbdev/riva/fbdev.c
drivers/video/fbdev/s3fb.c
drivers/video/fbdev/savage/savagefb_driver.c
drivers/video/fbdev/sis/init301.c
drivers/video/fbdev/skeletonfb.c
drivers/video/fbdev/sm501fb.c
drivers/video/fbdev/sm712fb.c
drivers/video/fbdev/smscufx.c
drivers/video/fbdev/sunxvr1000.c
drivers/video/fbdev/sunxvr2500.c
drivers/video/fbdev/sunxvr500.c
drivers/video/fbdev/tcx.c
drivers/video/fbdev/tdfxfb.c
drivers/video/fbdev/tridentfb.c
drivers/video/fbdev/udlfb.c
drivers/video/fbdev/uvesafb.c
drivers/video/fbdev/vermilion/vermilion.c
drivers/video/fbdev/via/via-core.c
drivers/video/fbdev/vt8623fb.c
drivers/video/fbdev/xilinxfb.c
drivers/video/of_display_timing.c
drivers/video/of_videomode.c
include/linux/fb.h
include/linux/fbcon.h [new file with mode: 0644]

index 4a9739abc860651825f62e6ffb71f9b592d57015..a38d3aa4d189960121ed9740fa0827773b574b91 100644 (file)
@@ -148,6 +148,13 @@ C. Boot options
        Actually, the underlying fb driver is totally ignorant of console
        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
 
 Before going on how to attach, detach and unload the framebuffer console, an
index 2111d06f8c81a5260235befb029d59901e7bde28..7f1f1fbcef9e269d1b6e48b25bdeb51b0e68426a 100644 (file)
@@ -117,7 +117,7 @@ config DUMMY_CONSOLE_ROWS
           Select 25 if you use a 640x480 resolution by default.
 
 config FRAMEBUFFER_CONSOLE
-       tristate "Framebuffer Console support"
+       bool "Framebuffer Console support"
        depends on FB && !UML
        select VT_HW_CONSOLE_BINDING
        select CRC32
index 43bfa485db9687411411e1fecdef4c29565c7ab6..eb2cbec5264340300078fa3b74de31ce28885aaa 100644 (file)
@@ -7,13 +7,5 @@ obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o
 obj-$(CONFIG_STI_CONSOLE)         += sticon.o sticore.o
 obj-$(CONFIG_VGA_CONSOLE)         += vgacon.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
index dc06cb6a15dc094b4d107c843320f6e97c4e0103..445b1dc5d441a1863ce64cf3807f03d77ae662c7 100644 (file)
@@ -398,9 +398,8 @@ static const char *vgacon_startup(void)
 #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))
                goto no_vga;
 
index c0c6b88d383915fe6e5924bd49434f6a13170278..d48e96088f76fcf90c3b53a628952dcc1e8b90e2 100644 (file)
@@ -72,7 +72,7 @@ static struct fb_var_screeninfo mc68x328fb_default __initdata = {
        .vmode =        FB_VMODE_NONINTERLACED,
 };
 
-static struct fb_fix_screeninfo mc68x328fb_fix __initdata = {
+static const struct fb_fix_screeninfo mc68x328fb_fix __initconst = {
        .id =           "68328fb",
        .type =         FB_TYPE_PACKED_PIXELS,
        .xpanstep =     1,
index 5c6696bb56da89d1ca86f00f16c3c408303ca5ad..5e58f5ec0a28e449afa8813a652b1aa3469e0721 100644 (file)
@@ -2173,7 +2173,7 @@ config FB_PS3_DEFAULT_SIZE_M
 
 config FB_XILINX
        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_COPYAREA
        select FB_CFB_IMAGEBLIT
index ffc2c33c6cef520a9aec6473b1b5fd1af96039fd..36d25190b48c80991dcabc0c5480c897f60e34eb 100644 (file)
@@ -1035,7 +1035,7 @@ static struct clcd_vendor_data vendor_nomadik = {
        .init_panel = nomadik_clcd_init_panel,
 };
 
-static struct amba_id clcdfb_id_table[] = {
+static const struct amba_id clcdfb_id_table[] = {
        {
                .id     = 0x00041110,
                .mask   = 0x000ffffe,
index 6a317de7082c9874d23c1fa5b4dfaa10dacbecda..13ba371e70aa3630795164af9f6608c4fb90753e 100644 (file)
@@ -1157,7 +1157,7 @@ fail:
 
 /* 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)},
        {0, 0, 0, 0, 0, 0, 0}
 };
index 91eea4583382dfa12a20204eb907789d28e4d4ba..ea31054a28ca80205c50d6b0a97f7a71fb177297 100644 (file)
@@ -592,7 +592,7 @@ static void asiliantfb_remove(struct pci_dev *dp)
        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 },
        { 0 }
 };
index 669ecc755fa9852f97479a5819bc71ca11314c07..e06358da4b99698525fa57d3dcca6666757d23dd 100644 (file)
@@ -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,
        .visual         = FB_VISUAL_TRUECOLOR,
        .xpanstep       = 0,
index fa07242a78d2910966db4492618b7e5d5ca3282f..db18474607c9c9c701353b8c347baf3e39c5ba63 100644 (file)
@@ -116,7 +116,7 @@ static const struct fb_var_screeninfo default_var = {
 
 /* default modedb mode */
 /* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */
-static struct fb_videomode defaultmode = {
+static const struct fb_videomode defaultmode = {
        .refresh =      60,
        .xres =         640,
        .yres =         480,
@@ -166,7 +166,7 @@ static int aty128_pci_resume(struct pci_dev *pdev);
 static int aty128_do_resume(struct pci_dev *pdev);
 
 /* 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_ANY_ID, PCI_ANY_ID, 0, 0, rage_M3_pci },
        { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LF,
index b55fdac9c9f51a7b0b6d9fe5d2c804b3046f2f05..3ec72f19114badf5cb26fe1cb530c04916b9d8c0 100644 (file)
@@ -274,7 +274,7 @@ static struct fb_var_screeninfo default_var = {
        0, FB_VMODE_NONINTERLACED
 };
 
-static struct fb_videomode defmode = {
+static const struct fb_videomode defmode = {
        /* 640x480 @ 60 Hz, 31.5 kHz hsync */
        NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
        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)
        case ATYIO_CLKR:
                if (M64_HAS(INTEGRATED)) {
-                       struct atyclk clk;
+                       struct atyclk clk = { 0 };
                        union aty_pll *pll = &par->pll;
                        u32 dsp_config = pll->ct.dsp_config;
                        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);
 }
 
-static struct pci_device_id atyfb_pci_tbl[] = {
+static const struct pci_device_id atyfb_pci_tbl[] = {
 #ifdef CONFIG_FB_ATY_GX
        { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_CHIP_MACH64GX) },
        { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_CHIP_MACH64CX) },
index 6b4c7872b37519f9fe6238d4fa505d76e14d4c92..1e2ec360f8c16da91b8ee9e921452ef4bda77834 100644 (file)
@@ -96,7 +96,7 @@
 #define CHIP_DEF(id, family, flags)                                    \
        { 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 */
        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),
@@ -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);
 }
 
-static struct bin_attribute edid1_attr = {
+static const struct bin_attribute edid1_attr = {
        .attr   = {
                .name   = "edid1",
                .mode   = 0444,
@@ -2250,7 +2250,7 @@ static struct bin_attribute edid1_attr = {
        .read   = radeon_show_edid1,
 };
 
-static struct bin_attribute edid2_attr = {
+static const struct bin_attribute edid2_attr = {
        .attr   = {
                .name   = "edid2",
                .mode   = 0444,
index b594a58ff21d3e63e5c7a6dd29bc6c86919cf491..b459354ad9400bcc386d188197c92574ec618558 100644 (file)
@@ -841,7 +841,7 @@ static int bfin_lq035q1_resume(struct device *dev)
        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,
        .resume  = bfin_lq035q1_resume,
 };
index 8c5b281f0b299c864664c3bba78ec3b0b3ef0599..7aa9720723577ece2bf536e2776b21e28b047c08 100644 (file)
@@ -333,8 +333,8 @@ static int bw2_probe(struct platform_device *op)
 
        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;
 
index 43e915eaf606f31bd5c4dee0367a45fb0647bf71..8de88b129b62244c11e44092687020c2a7b0257f 100644 (file)
@@ -553,8 +553,8 @@ static int cg14_probe(struct platform_device *op)
 
        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->ramsize >> 20);
 
index 716391f22e75f97ac55751cd3b20b4d1f3e24496..6c334260cf532faca8b36f9e8e05cb76d167fcf7 100644 (file)
@@ -412,8 +412,8 @@ static int cg3_probe(struct platform_device *op)
 
        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;
 
index bdf901ed52910e1fc8f08dde72eff1f22d312190..0296c21acc78a2bc5207694b4821c9c3f30e1750 100644 (file)
@@ -810,8 +810,8 @@ static int cg6_probe(struct platform_device *op)
 
        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);
 
        return 0;
index 59abdc6a97f668ed1b67e6bd9e958b74479bd99e..f103665cad431c449422b87bea145934444a46e4 100644 (file)
@@ -292,7 +292,7 @@ static void chips_hw_init(void)
                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",
        .type =         FB_TYPE_PACKED_PIXELS,
        .visual =       FB_VISUAL_PSEUDOCOLOR,
@@ -309,7 +309,7 @@ static struct fb_fix_screeninfo chipsfb_fix = {
        .smem_len =     0x100000,       /* 1MB */
 };
 
-static struct fb_var_screeninfo chipsfb_var = {
+static const struct fb_var_screeninfo chipsfb_var = {
        .xres = 800,
        .yres = 600,
        .xres_virtual = 800,
index 9da90bd242f4e4a0c36af5fd4e7d34254e9e6ecb..0ef633e278a1b782ed9a903eb5d0f0848d3d7953 100644 (file)
@@ -126,7 +126,7 @@ static void lcd_clear(struct fb_info *info)
        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",
        .type           = FB_TYPE_TEXT,
        .type_aux       = FB_AUX_TEXT_MDA,
index 9e3ddf225393e697ce0993814eb37f1dbe6f087a..73493bbd7a15a6278708b55315563cdbd08e3c9d 100644 (file)
@@ -4,6 +4,20 @@ obj-$(CONFIG_FB)                  += fb.o
 fb-y                              := fbmem.o fbmon.o fbcmap.o fbsysfs.o \
                                      modedb.o fbcvt.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)
 
 obj-$(CONFIG_FB_CFB_FILLRECT)  += cfbfillrect.o
similarity index 98%
rename from drivers/video/console/bitblit.c
rename to drivers/video/fbdev/core/bitblit.c
index dbfe4eecf12e56d328478dff9a84064c591bfe85..790900d646c03cf2c96871e9373c367a58edc83e 100644 (file)
@@ -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,
-                             int bottom_only)
+                             int color, int bottom_only)
 {
        unsigned int cw = vc->vc_font.width;
        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;
        struct fb_fillrect region;
 
-       region.color = 0;
+       region.color = color;
        region.rop = ROP_COPY;
 
        if (rw && !bottom_only) {
@@ -416,7 +416,3 @@ void fbcon_set_bitops(struct fbcon_ops *ops)
 
 EXPORT_SYMBOL(fbcon_set_bitops);
 
-MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
-MODULE_DESCRIPTION("Bit Blitting Operation");
-MODULE_LICENSE("GPL");
-
similarity index 99%
rename from drivers/video/console/fbcon.c
rename to drivers/video/fbdev/core/fbcon.c
index 12ded23f1aaff70a136114e78d58b3efdfaddc37..04612f938bab1fc3eecf457d070fe501b8a1a3de 100644 (file)
@@ -68,6 +68,7 @@
 #include <linux/kd.h>
 #include <linux/slab.h>
 #include <linux/fb.h>
+#include <linux/fbcon.h>
 #include <linux/vt_kern.h>
 #include <linux/selection.h>
 #include <linux/font.h>
@@ -135,8 +136,9 @@ static char fontname[40];
 static int info_idx = -1;
 
 /* console rotation */
-static int initial_rotation;
+static int initial_rotation = -1;
 static int fbcon_has_sysfs;
+static int margin_color;
 
 static const struct consw fb_con;
 
@@ -491,6 +493,13 @@ static int __init fb_console_setup(char *this_opt)
                                initial_rotation = 0;
                        continue;
                }
+
+               if (!strncmp(options, "margin:", 7)) {
+                       options += 7;
+                       if (*options)
+                               margin_color = simple_strtoul(options, &options, 0);
+                       continue;
+               }
        }
        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;
        int logo_height;
 
-       if (info->flags & FBINFO_MODULE) {
+       if (info->fbops->owner) {
                logo_shown = FBCON_LOGO_DONTSHOW;
                return;
        }
@@ -954,7 +963,10 @@ static const char *fbcon_startup(void)
        ops->cur_rotate = -1;
        ops->cur_blink_jiffies = HZ / 5;
        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);
 
        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->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);
 
        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;
 
        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)
@@ -3606,7 +3621,7 @@ static void fbcon_exit(void)
        fbcon_has_exited = 1;
 }
 
-static int __init fb_console_init(void)
+void __init fb_console_init(void)
 {
        int i;
 
@@ -3628,11 +3643,8 @@ static int __init fb_console_init(void)
 
        console_unlock();
        fbcon_start();
-       return 0;
 }
 
-fs_initcall(fb_console_init);
-
 #ifdef MODULE
 
 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();
        fb_unregister_client(&fbcon_event_notifier);
@@ -3657,9 +3669,4 @@ static void __exit fb_console_exit(void)
        do_unregister_con_driver(&fb_con);
        console_unlock();
 }      
-
-module_exit(fb_console_exit);
-
 #endif
-
-MODULE_LICENSE("GPL");
similarity index 97%
rename from drivers/video/console/fbcon.h
rename to drivers/video/fbdev/core/fbcon.h
index 7aaa4eabbba0557af34afa2414560efb8b74804b..18f3ac14423706adc006f37bee55b1241627f99d 100644 (file)
@@ -60,7 +60,7 @@ struct fbcon_ops {
                      const unsigned short *s, int count, int yy, int xx,
                      int fg, int bg);
        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,
                       int softback_lines, int fg, int bg);
        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)
 #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 */
similarity index 98%
rename from drivers/video/console/fbcon_ccw.c
rename to drivers/video/fbdev/core/fbcon_ccw.c
index 5a3cbf6dff4d944ff5a0ac3fb1fd62c2fba3106a..37a8b0b225663780e6e28dd4ba239a6be9581071 100644 (file)
@@ -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,
-                            int bottom_only)
+                             int color, int bottom_only)
 {
        unsigned int cw = vc->vc_font.width;
        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;
        struct fb_fillrect region;
 
-       region.color = 0;
+       region.color = color;
        region.rop = ROP_COPY;
 
        if (rw && !bottom_only) {
@@ -418,7 +418,3 @@ void fbcon_rotate_ccw(struct fbcon_ops *ops)
        ops->update_start = ccw_update_start;
 }
 EXPORT_SYMBOL(fbcon_rotate_ccw);
-
-MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
-MODULE_DESCRIPTION("Console Rotation (270 degrees) Support");
-MODULE_LICENSE("GPL");
similarity index 98%
rename from drivers/video/console/fbcon_cw.c
rename to drivers/video/fbdev/core/fbcon_cw.c
index e7ee44db4e98b1318cf8e9f679843354e6b84862..1888f8c866e82ecc35571fe9ad35493f0feedef2 100644 (file)
@@ -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,
-                            int bottom_only)
+                            int color, int bottom_only)
 {
        unsigned int cw = vc->vc_font.width;
        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;
        struct fb_fillrect region;
 
-       region.color = 0;
+       region.color = color;
        region.rop = ROP_COPY;
 
        if (rw && !bottom_only) {
@@ -401,7 +401,3 @@ void fbcon_rotate_cw(struct fbcon_ops *ops)
        ops->update_start = cw_update_start;
 }
 EXPORT_SYMBOL(fbcon_rotate_cw);
-
-MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
-MODULE_DESCRIPTION("Console Rotation (90 degrees) Support");
-MODULE_LICENSE("GPL");
diff --git a/drivers/video/fbdev/core/fbcon_dmi_quirks.c b/drivers/video/fbdev/core/fbcon_dmi_quirks.c
new file mode 100644 (file)
index 0000000..6904e47
--- /dev/null
@@ -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;
+}
similarity index 95%
rename from drivers/video/console/fbcon_rotate.c
rename to drivers/video/fbdev/core/fbcon_rotate.c
index db6528f2d3f29506cd33c55b48ee5ece6fef4a37..8a51e4d95cc5062ae9efa6c14ac7433de9e668bd 100644 (file)
@@ -110,7 +110,3 @@ void fbcon_set_rotate(struct fbcon_ops *ops)
        }
 }
 EXPORT_SYMBOL(fbcon_set_rotate);
-
-MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
-MODULE_DESCRIPTION("Console Rotation Support");
-MODULE_LICENSE("GPL");
similarity index 98%
rename from drivers/video/console/fbcon_ud.c
rename to drivers/video/fbdev/core/fbcon_ud.c
index 19e3714abfe8fb765eaaea2ebeb9a21c5c2725de..f98eee263597b08a9677dc8f0072fc62a2cba022 100644 (file)
@@ -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,
-                            int bottom_only)
+                            int color, int bottom_only)
 {
        unsigned int cw = vc->vc_font.width;
        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);
        struct fb_fillrect region;
 
-       region.color = 0;
+       region.color = color;
        region.rop = ROP_COPY;
 
        if (rw && !bottom_only) {
@@ -446,7 +446,3 @@ void fbcon_rotate_ud(struct fbcon_ops *ops)
        ops->update_start = ud_update_start;
 }
 EXPORT_SYMBOL(fbcon_rotate_ud);
-
-MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
-MODULE_DESCRIPTION("Console Rotation (180 degrees) Support");
-MODULE_LICENSE("GPL");
index 25e862c487f643f97353abb607caf23ea336a757..f741ba8df01b8e28f4331f988d2b04219bb103b6 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/device.h>
 #include <linux/efi.h>
 #include <linux/fb.h>
+#include <linux/fbcon.h>
 #include <linux/mem_encrypt.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 (j = 0; j < logo->width; src++) {
                                d = *src ^ xor;
-                               for (k = 7; k >= 0; k--) {
+                               for (k = 7; k >= 0 && j < logo->width; k--) {
                                        *dst++ = ((d >> k) & 1) ? fg : 0;
                                        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 */
        if (logo == NULL || info->state != FBINFO_STATE_RUNNING ||
-           info->flags & FBINFO_MODULE)
+           info->fbops->owner)
                return 0;
 
        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));
 
        if (info->flags & FBINFO_MISC_TILEBLITTING ||
-           info->flags & FBINFO_MODULE)
+           info->fbops->owner)
                return 0;
 
        if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
@@ -1892,6 +1893,9 @@ fbmem_init(void)
                fb_class = NULL;
                goto err_class;
        }
+
+       fb_console_init();
+
        return 0;
 
 err_class:
@@ -1906,6 +1910,8 @@ module_init(fbmem_init);
 static void __exit
 fbmem_exit(void)
 {
+       fb_console_exit();
+
        remove_proc_entry("fb", NULL);
        class_destroy(fb_class);
        unregister_chrdev(FB_MAJOR, "fb");
index 41d7979d81c53df3d459d39939798659386444a8..2b2d673285148bc4dba1eb24c8d0d18f4d8b6a01 100644 (file)
@@ -1479,8 +1479,8 @@ int of_get_fb_videomode(struct device_node *np, struct fb_videomode *fb,
        if (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);
 
        return 0;
similarity index 93%
rename from drivers/video/console/softcursor.c
rename to drivers/video/fbdev/core/softcursor.c
index 46dd8f5d2e9e1c899921893f314ce590ea998d10..fc93f254498e2aa5b0566d1e08052ac31d6ebb93 100644 (file)
@@ -76,7 +76,3 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor)
 }
 
 EXPORT_SYMBOL(soft_cursor);
-
-MODULE_AUTHOR("James Simmons <jsimmons@users.sf.net>");
-MODULE_DESCRIPTION("Generic software cursor");
-MODULE_LICENSE("GPL");
similarity index 96%
rename from drivers/video/console/tileblit.c
rename to drivers/video/fbdev/core/tileblit.c
index 15e8e1a89c45def0d7f9ebc0ab8fbdaa1563ff8b..93390312957ffa3d89627deffc8eb6643cfb74f5 100644 (file)
@@ -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,
-                              int bottom_only)
+                              int color, int bottom_only)
 {
        return;
 }
@@ -152,8 +152,3 @@ void fbcon_set_tileops(struct vc_data *vc, struct fb_info *info)
 }
 
 EXPORT_SYMBOL(fbcon_set_tileops);
-
-MODULE_AUTHOR("Antonino Daplas <adaplas@pol.net>");
-MODULE_DESCRIPTION("Tile Blitting Operation");
-MODULE_LICENSE("GPL");
-
index 99acf538a8b812a98ada497fb6430c6ae0f02f25..9a5751cb4e1656bb7b0b2932cf8baae9e0fb61d0 100644 (file)
@@ -1336,7 +1336,7 @@ static void cyber2000fb_i2c_unregister(struct cfb_info *cfb)
  * These parameters give
  * 640x480, hsync 31.5kHz, vsync 60Hz
  */
-static struct fb_videomode cyber2000fb_default_mode = {
+static const struct fb_videomode cyber2000fb_default_mode = {
        .refresh        = 60,
        .xres           = 640,
        .yres           = 480,
index c229b1a0d13b350bce029d2fcd78ef60bd4c65b1..a74096c53cb50516df5e1415af95e1373f0602b0 100644 (file)
@@ -1341,7 +1341,7 @@ static int fb_probe(struct platform_device *device)
 {
        struct da8xx_lcdc_platform_data *fb_pdata =
                                                dev_get_platdata(&device->dev);
-       static struct resource *lcdc_regs;
+       struct resource *lcdc_regs;
        struct lcd_ctrl_config *lcd_cfg;
        struct fb_videomode *lcdc_info;
        struct fb_info *da8xx_fb_info;
index 3526899da61b93e2c40532b6edb337cc5be53300..7b1492d34e989ab92a1a4819192afc00294af4d7 100644 (file)
@@ -126,7 +126,7 @@ struct fb_var_screeninfo dnfb_var = {
        .vmode          = FB_VMODE_NONINTERLACED,
 };
 
-static struct fb_fix_screeninfo dnfb_fix = {
+static const struct fb_fix_screeninfo dnfb_fix = {
        .id             = "Apollo Mono",
        .smem_start     = (FRAME_BUFFER_START + IO_BASE),
        .smem_len       = FRAME_BUFFER_LEN,
index 88fa2e70a0bb1683fe04e81b3f32227b7d2f6789..d9e816d53531324b2ec03a33ebea709936489c53 100644 (file)
@@ -69,7 +69,7 @@ static const struct fb_videomode unifb_modes[] = {
          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,
        .yres =         480,
        .xres_virtual = 640,
index dda31e0a45af282a4b72d4ad19f33cdda1da7efc..6b1915872af1658c06f43d057f387303f6e69386 100644 (file)
@@ -997,9 +997,9 @@ static int ffb_probe(struct platform_device *op)
 
        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",
-              dp->full_name,
+              dp,
               ((par->flags & FFB_FLAG_AFB) ? "AFB" : "FFB"),
               par->physbase, par->board_type,
               dac_pnum, dac_rev, dac_mrev);
index e69d47af9932a0c813f8402129b646ed8f98b5aa..ac7a4ebfd390e8f589e8a433ce47397b490bd1dd 100644 (file)
@@ -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 struct zorro_device_id fm2fb_devices[] = {
+static const struct zorro_device_id fm2fb_devices[] = {
        { ZORRO_PROD_BSC_FRAMEMASTER_II },
        { ZORRO_PROD_HELFRICH_RAINBOW_II },
        { 0 }
index ec9fc9ac23decf320408e66f15ae5e5cf0bb8bea..f4f76373b2a871ae26532afe8729282939988942 100644 (file)
@@ -474,7 +474,7 @@ static void gxfb_remove(struct pci_dev *pdev)
        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) },
        { 0, }
 };
index b471f92969b1bbd5de8c16b592d4ddb18064e5cb..8fc8f46dadeb5c597942773f12c4f97e47bf0c5b 100644 (file)
@@ -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",
        .type =         FB_TYPE_PACKED_PIXELS,
        .visual =       FB_VISUAL_PSEUDOCOLOR,
index 2488baab7c89253b4606faf3b5ae3877939b9201..d18f7b31932c832d3a00b6e0475c8512b2db80a0 100644 (file)
@@ -107,7 +107,7 @@ static const char * const i810_pci_list[] = {
        "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_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { 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;
 }
 
-static struct fb_ops i810fb_ops = {
+static const struct fb_ops i810fb_ops = {
        .owner =             THIS_MODULE,
        .fb_open =           i810fb_open,
        .fb_release =        i810fb_release,
index 4363c64d74e8c1481842735aa2fc0d1831344b05..ecdcf358ad5eac2d76f20439add5818625ff64e2 100644 (file)
@@ -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_ANY_ID, PCI_ANY_ID, 0, 0, IBM },
        { PCI_VENDOR_ID_IMS, PCI_DEVICE_ID_IMS_TT3D,
index ffc391208b27152ffcea7ce1a6842ecceb754597..d7463a2a5d83f2f11ae00662aab3edc7b1682cba 100644 (file)
@@ -173,7 +173,7 @@ static int intelfb_set_fbinfo(struct intelfb_info *dinfo);
 #define INTELFB_CLASS_MASK 0
 #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_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 },
index f77478fb3d14a3dcc8d013824994a378ba541b4d..a7bd9f25911b534d10e23ca1eae7ccac6ba99288 100644 (file)
@@ -633,7 +633,7 @@ static int kyrofb_ioctl(struct fb_info *info,
        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_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { 0, }
index 62e59dc90ee64ad100980dd99eea4756d0d086b3..71862188f5285953104c62744d3216bfb8a59d10 100644 (file)
@@ -619,8 +619,8 @@ static int leo_probe(struct platform_device *op)
 
        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);
 
        return 0;
index f6a0b9af97a90b3fa3989c480b3934d9bec0ed9b..b9b284d79631d35b11f65536d516314b6157b956 100644 (file)
@@ -1198,7 +1198,7 @@ static int matroxfb_blank(int blank, struct fb_info *info)
        return 0;
 }
 
-static struct fb_ops matroxfb_ops = {
+static const struct fb_ops matroxfb_ops = {
        .owner =        THIS_MODULE,
        .fb_open =      matroxfb_open,
        .fb_release =   matroxfb_release,
@@ -1573,14 +1573,14 @@ static struct board {
                NULL}};
 
 #ifndef MODULE
-static struct fb_videomode defaultmode = {
+static const struct fb_videomode defaultmode = {
        /* 640x480 @ 60Hz, 31.5 kHz */
        NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
        0, FB_VMODE_NONINTERLACED
 };
-#endif /* !MODULE */
 
 static int hotplug = 0;
+#endif /* !MODULE */
 
 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;
        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) },
                { },
        };
@@ -1794,9 +1794,7 @@ static int initMatrox2(struct matrox_fb_info *minfo, struct board *b)
        minfo->fbops = matroxfb_ops;
        minfo->fbcon.fbops = &minfo->fbops;
        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_FILLRECT |  /* And fillrect */
                                      FBINFO_HWACCEL_IMAGEBLIT | /* And imageblit */
@@ -2116,7 +2114,7 @@ static void pci_remove_matrox(struct pci_dev* pdev) {
        matroxfb_remove(minfo, 1);
 }
 
-static struct pci_device_id matroxfb_devices[] = {
+static const struct pci_device_id matroxfb_devices[] = {
 #ifdef CONFIG_FB_MATROX_MILLENIUM
        {PCI_VENDOR_ID_MATROX,  PCI_DEVICE_ID_MATROX_MIL,
                PCI_ANY_ID,     PCI_ANY_ID,     0, 0, 0},
index cab7333208eab44e38b1ac8f33bfd1a3c230dcfc..5bb1b5c308a775d4f35c83b2ed243e0996e7146e 100644 (file)
@@ -39,7 +39,7 @@
 
 static struct fb_info fb_info;
 
-static struct fb_var_screeninfo maxinefb_defined = {
+static const struct fb_var_screeninfo maxinefb_defined = {
        .xres =         1024,
        .yres =         768,
        .xres_virtual = 1024,
index f9ec5c0484fabbd8d6f2cc5b5e5897c003e07b10..cd372527c9e4b750def373bc1dfa1192f5315744 100644 (file)
@@ -982,7 +982,7 @@ static inline int mb862xx_pci_gdc_init(struct mb862xxfb_par *par)
 #define CHIP_ID(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 */
        CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALP),
        CHIP_ID(PCI_DEVICE_ID_FUJITSU_CORALPA),
index 698df9543e30c0a0c13f78a0d9e70bc73753ed39..539b85da08973b9dda4261436e7811fcbf76f7ed 100644 (file)
@@ -79,7 +79,7 @@ struct mbxfb_info {
 
 };
 
-static struct fb_var_screeninfo mbxfb_default = {
+static const struct fb_var_screeninfo mbxfb_default = {
        .xres = 640,
        .yres = 480,
        .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,
 };
 
-static struct fb_fix_screeninfo mbxfb_fix = {
+static const struct fb_fix_screeninfo mbxfb_fix = {
        .id = "MBX",
        .type = FB_TYPE_PACKED_PIXELS,
        .visual = FB_VISUAL_TRUECOLOR,
index db023a97d1eaedca6dc1d1c8929330c4a993f390..5d3a444083f74c713b784a474586f64c69db1642 100644 (file)
@@ -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_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2070},
 
index ce7dab7299fe2e66846171bdc60e073da57c0581..418a2d0d06a95b7005472983f386a75bc4426abf 100644 (file)
@@ -55,7 +55,7 @@
 /* HW cursor parameters */
 #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_BASE_CLASS_DISPLAY << 16, 0xff0000, 0},
        { 0, }
index 9be884b0c778b562a699d4ae620d136fa3ae4e2c..90d38de344797884fbf9d092e8095851dad21412 100644 (file)
@@ -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;
 }
 
-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 pitch, unsigned long address,
                                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",
               width, height, name, address, depth, pitch);
        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);
                return;
        }
 
        info = framebuffer_alloc(sizeof(u32) * 16, NULL);
-       
+
        if (info == 0) {
                release_mem_region(res_start, res_size);
                return;
@@ -515,7 +514,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
        if (register_framebuffer(info) < 0)
                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;
 
 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)
                        address += 0x1000;
                offb_init_fb(no_real_node ? "bootx" : dp->name,
-                            no_real_node ? "display" : dp->full_name,
                             width, height, depth, pitch, address,
                             foreign_endian, no_real_node ? NULL : dp);
        }
index df9e6ebcfad5f8d37048e3db8901406e96177c1a..e3a85432f9266943886e6e2504e5415b66f359d4 100644 (file)
@@ -496,7 +496,7 @@ static void mipid_cleanup(struct lcd_panel *panel)
                mipid_esd_stop_check(md);
 }
 
-static struct lcd_panel mipid_panel = {
+static const struct lcd_panel mipid_panel = {
        .config         = OMAP_LCDC_PANEL_TFT,
 
        .bpp            = 16,
index f14691ce8d020f850a8df3b86b9ccc9d538afb4b..6cd759c0103754b3378915eecf4f6ce7da5314d3 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <video/omapfb_dss.h>
 
-static struct omap_video_timings lb035q02_timings = {
+static const struct omap_video_timings lb035q02_timings = {
        .x_res = 320,
        .y_res = 240,
 
index 468560a6daaea16c891193f98369f4be9aabf63a..f2c2fef3db744914ba3b5c18ee4bc562ef1c1fa4 100644 (file)
@@ -509,7 +509,7 @@ static struct attribute *bldev_attrs[] = {
        NULL,
 };
 
-static struct attribute_group bldev_attr_group = {
+static const struct attribute_group bldev_attr_group = {
        .attrs = bldev_attrs,
 };
 
index b529a8c2b652cfa327ad0435024870e4b60c7ddc..57e9e146ff74c0f30bc15491d7abf3c179de2150 100644 (file)
@@ -41,7 +41,7 @@ struct panel_drv_data {
        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,
        .y_res          = 640,
        .pixelclock     = 22153000,
index 51e628b85f4a097693cf9c922962eaf7659c32c6..ea8c79a42b41a67c439e974db81514ef38f4fddd 100644 (file)
@@ -282,7 +282,7 @@ static struct attribute *tpo_td043_attrs[] = {
        NULL,
 };
 
-static struct attribute_group tpo_td043_attr_group = {
+static const struct attribute_group tpo_td043_attr_group = {
        .attrs = tpo_td043_attrs,
 };
 
index d356a252ab4a7f14d8042df74159b0732e0bdd6c..f1eb8b0f8a2aac3358b4a23a133f244ed385a127 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/err.h>
 #include <linux/module.h>
 #include <linux/of.h>
+#include <linux/of_graph.h>
 #include <linux/seq_file.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;
 
-       np = of_parse_phandle(node, "remote-endpoint", 0);
+       np = of_graph_get_remote_endpoint(node);
        if (!np)
                return NULL;
 
index 1f6ee76af8786d59ecbe6d90c9036c908476d0d1..64de5cda541ddd5e55c24a2f60079d962b5add8d 100644 (file)
@@ -304,8 +304,8 @@ static int p9100_probe(struct platform_device *op)
 
        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);
 
        return 0;
index 1a4070f719c298f18d3b39cddb6c0cdd8f3a135a..bd6c2f5f6095d585b486399dcb19da50fd3c0c7b 100644 (file)
@@ -1732,7 +1732,7 @@ static void pm2fb_remove(struct pci_dev *pdev)
        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_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { PCI_VENDOR_ID_3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2,
index 6ff5077a2e15ba2d5da0732dca85d259c22d23f3..6130aa56a1e93239dbad34558ed6273ce155d4e2 100644 (file)
@@ -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_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { 0, }
index 39922f072db4f89ed5212a8e509cb2e2ca86c2d8..ca7e9390d1e7e56af5832af076fd0181ae482ea8 100644 (file)
@@ -67,7 +67,7 @@ struct aafb_par {
        struct bt431_regs __iomem *bt431;
 };
 
-static struct fb_var_screeninfo aafb_defined = {
+static const struct fb_var_screeninfo aafb_defined = {
        .xres           = 1280,
        .yres           = 1024,
        .xres_virtual   = 2048,
@@ -90,7 +90,7 @@ static struct fb_var_screeninfo aafb_defined = {
        .vmode          = FB_VMODE_NONINTERLACED,
 };
 
-static struct fb_fix_screeninfo aafb_fix = {
+static const struct fb_fix_screeninfo aafb_fix = {
        .id             = "PMAG-AA",
        .smem_len       = (2048 * 1024),
        .type           = FB_TYPE_PACKED_PIXELS,
index 1fd02f40708eb79740db54a292ca87e8e24cab9c..3b9249449ea613967f65912d86e9fb4f7644a5b8 100644 (file)
@@ -43,7 +43,7 @@ struct pmagbafb_par {
 };
 
 
-static struct fb_var_screeninfo pmagbafb_defined = {
+static const struct fb_var_screeninfo pmagbafb_defined = {
        .xres           = 1024,
        .yres           = 864,
        .xres_virtual   = 1024,
@@ -67,7 +67,7 @@ static struct fb_var_screeninfo pmagbafb_defined = {
        .vmode          = FB_VMODE_NONINTERLACED,
 };
 
-static struct fb_fix_screeninfo pmagbafb_fix = {
+static const struct fb_fix_screeninfo pmagbafb_fix = {
        .id             = "PMAG-BA",
        .smem_len       = (1024 * 1024),
        .type           = FB_TYPE_PACKED_PIXELS,
index 46e96c4515060f0c58ade6ff892f711ad39aa0a6..e58df36233c4f35d49de997dc3a3878ec5130c9a 100644 (file)
@@ -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,
        .red.length     = 8,
        .green.length   = 8,
@@ -57,7 +57,7 @@ static struct fb_var_screeninfo pmagbbfb_defined = {
        .vmode          = FB_VMODE_NONINTERLACED,
 };
 
-static struct fb_fix_screeninfo pmagbbfb_fix = {
+static const struct fb_fix_screeninfo pmagbbfb_fix = {
        .id             = "PMAGB-BA",
        .smem_len       = (2048 * 1024),
        .type           = FB_TYPE_PACKED_PIXELS,
index b269abd932aab586d57ee62b8198dabbdf37ce21..5ed2db39d8236f2896021a190a36bfc4871e206a 100644 (file)
@@ -952,7 +952,7 @@ static struct fb_ops ps3fb_ops = {
        .fb_compat_ioctl = ps3fb_ioctl
 };
 
-static struct fb_fix_screeninfo ps3fb_fix = {
+static const struct fb_fix_screeninfo ps3fb_fix = {
        .id =           DEVICE_NAME,
        .type =         FB_TYPE_PACKED_PIXELS,
        .visual =       FB_VISUAL_TRUECOLOR,
index a2564ab91e62d3c2775441d292e54e1d25492a40..867c5218968f71cb105587c9add276ca9104227a 100644 (file)
@@ -154,7 +154,7 @@ static struct fb_fix_screeninfo pvr2_fix = {
        .accel =        FB_ACCEL_NONE,
 };
 
-static struct fb_var_screeninfo pvr2_var = {
+static const struct fb_var_screeninfo pvr2_var = {
        .xres =         640,
        .yres =         480,
        .xres_virtual = 640,
@@ -966,7 +966,7 @@ static void pvr2fb_pci_remove(struct pci_dev *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_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { 0, },
index 50bce45e7f3d47d78163058eff366b32d4f56180..933619da1a94b94e97c5c5f81b082b2eab7385df 100644 (file)
@@ -626,8 +626,8 @@ static int pxa3xx_gcu_probe(struct platform_device *pdev)
        /* request the IRQ */
        irq = platform_get_irq(pdev, 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,
index 04ea330ccf5da2501d679fd929bad51cf90f58cf..0b93aa964d435a23836e1a29a01e540a54dc0de8 100644 (file)
@@ -36,7 +36,7 @@ static struct fb_fix_screeninfo q40fb_fix = {
        .accel          = FB_ACCEL_NONE,
 };
 
-static struct fb_var_screeninfo q40fb_var = {
+static const struct fb_var_screeninfo q40fb_var = {
        .xres           = 1024,
        .yres           = 512,
        .xres_virtual   = 1024,
index 2ef26ad99341359afe3bc95e13625bf917969f4f..1ea78bb911fbb8b29c0dee88c5d13d1042170a52 100644 (file)
@@ -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_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TNT,
index 13b109073c632806dc2473f045003f78424e4629..d63f23e26f7d7cc7130b9c0f311259805b0734cf 100644 (file)
@@ -1483,7 +1483,7 @@ static int s3_pci_resume(struct pci_dev* dev)
 
 /* 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, 0x8811), .driver_data = CHIP_XXX_TRIO},
        {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP},
index c30a91c1137c6970821317e643f4f90c38878b4f..c20468362f11ce58a535ca9648b9397f6b6d6eef 100644 (file)
@@ -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_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
 
index 20f7234e809ef3b0ce7fdd8ea9dd0c93da37cd43..1ec9c3e0e1d85092f4e06b3a2db04d9836e36a1f 100644 (file)
@@ -6848,8 +6848,6 @@ SiS_SetGroup2(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short
           if(SiS_Pr->SiS_VGAHDE >= 1280) {
               tempch = 20;
               tempbx &= ~0x20;
-           } else if(SiS_Pr->SiS_VGAHDE >= 1024) {
-              tempch = 25;
            } else {
              tempch = 25; /* OK */
           }
@@ -7964,14 +7962,9 @@ SiS_SetCHTVReg(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short
             }
          }
       } 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 */
@@ -9657,8 +9650,6 @@ SetDelayComp(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
              delay = 0x0a;
           } else if(IS_SIS740) {
              delay = 0x00;
-          } else if(SiS_Pr->ChipType < SIS_330) {
-             delay = 0x0c;
           } else {
              delay = 0x0c;
           }
index e219a0a2207703f68f8a59d62bbe6556b630a43f..7f4e908330bf0509014612a1fa2a3bf4be1e2e7c 100644 (file)
@@ -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
  * 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", 
        .type =         FB_TYPE_PACKED_PIXELS,
        .visual =       FB_VISUAL_PSEUDOCOLOR,
@@ -866,7 +866,7 @@ static int xxxfb_resume(struct pci_dev *dev)
 #define xxxfb_resume NULL
 #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_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
          PCI_CLASS_MASK, 0 },
index 67e314fdd9471513b911d07d33c0ff3c13e25a05..076dd2711630e1f78c3bf19572915b0b2b9831ee 100644 (file)
@@ -46,7 +46,7 @@
 static char *fb_mode = "640x480-16@60";
 static unsigned long default_bpp = 16;
 
-static struct fb_videomode sm501_default_mode = {
+static const struct fb_videomode sm501_default_mode = {
        .refresh        = 60,
        .xres           = 640,
        .yres           = 480,
index 73cb4ffff3c5910f5dfb8b41f5e40f2849803459..502d0de2feec524f6b8eec46072300a86733179c 100644 (file)
@@ -33,8 +33,8 @@
 #include "sm712.h"
 
 /*
-* Private structure
-*/
+ * Private structure
+ */
 struct smtcfb_info {
        struct pci_dev *pdev;
        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_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++) {
                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) */
        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;
 }
 
-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;
        u32 val;
@@ -1477,7 +1478,7 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
        }
 
        /* 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.xres_virtual = sfb->fb->var.xres;
index 449fceaf79d5505a0e2c409adeb968dbaad4413c..2275e80b577669afcede4323616a273a47e3ed73 100644 (file)
@@ -122,7 +122,7 @@ static const u32 smscufx_info_flags = FBINFO_DEFAULT | FBINFO_READS_FAST |
        FBINFO_VIRTFB | FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT |
        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, 0x9d01),},
        {},
index fb37f6e053915a62c82564d6b929df8a9d044426..8fe37c0ef2f504448bd162fc2feab2b3a857a432 100644 (file)
@@ -33,8 +33,8 @@ static int gfb_get_props(struct gfb_info *gp)
        gp->depth = of_getintprop_default(gp->of_node, "depth", 32);
 
        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;
        }
 
@@ -151,12 +151,12 @@ static int gfb_probe(struct platform_device *op)
        if (err)
                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);
        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;
        }
 
index 1a053292f2eb175a57e41fd333fa5558073265be..544465ba1dc03e38df81bd9bfed440aea9f1c2f4 100644 (file)
@@ -220,7 +220,7 @@ err_out:
        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, 0x002d),       },
        {       PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002e),       },
index dc0d886e4e7efae4017b2c77e991d0bc34d4ae57..bc595937df0810d4f7ea0ba6fedc149b2d737549 100644 (file)
@@ -393,7 +393,7 @@ err_out:
        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(0x1091, 0x7a0),                      },
        {       PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a2),        },
index 54ad08854c94a36155aa28364fdfb0022db645b8..c98d8a569ccd2429306bb2376d6239077dea4ed6 100644 (file)
@@ -467,8 +467,8 @@ static int tcx_probe(struct platform_device *op)
 
        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,
               info->fix.smem_start,
               par->lowdepth ? "8-bit only" : "24-bit depth");
index d5fa313806fe7ebd63fb6f2889bd5306c0003432..dec1fed9880eaa75b6d3dcf3bb6bbb24bed454f4 100644 (file)
@@ -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 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_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
          0xff0000, 0 },
index 8a5bbc13082eb92154b6b6c84fd4c415a6be485d..284706184b1b67bdd28395fc97213baf844b58c2 100644 (file)
@@ -1737,7 +1737,7 @@ static void trident_pci_remove(struct pci_dev *dev)
 }
 
 /* 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, CYBERBLADEi7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi7D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
index 05ef657235df2eb72c68e8a892d70e3edadd17d8..ef08a104fb42c6dafe3c88d32ca18b7430ede759 100644 (file)
@@ -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,
  * 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,
         .bInterfaceClass = 0xff,
         .bInterfaceSubClass = 0x00,
@@ -1465,7 +1465,7 @@ static ssize_t metrics_reset_store(struct device *fbdev,
        return count;
 }
 
-static struct bin_attribute edid_attr = {
+static const struct bin_attribute edid_attr = {
        .attr.name = "edid",
        .attr.mode = 0666,
        .size = EDID_LENGTH,
@@ -1655,7 +1655,6 @@ static int dlfb_usb_probe(struct usb_interface *interface,
 error:
        if (dev) {
 
-               kref_put(&dev->kref, dlfb_free); /* ref for framebuffer */
                kref_put(&dev->kref, dlfb_free); /* last ref from kref_init */
 
                /* dev has been deallocated. Do not dereference */
index 6f8c0b9fc558b2a57a941f0b7fe9d85a58b6659a..73676eb0244a7bd63d294619563d723992a93183 100644 (file)
@@ -1666,7 +1666,7 @@ static struct attribute *uvesafb_dev_attrs[] = {
        NULL,
 };
 
-static struct attribute_group uvesafb_dev_attgrp = {
+static const struct attribute_group uvesafb_dev_attgrp = {
        .name = NULL,
        .attrs = uvesafb_dev_attrs,
 };
index ce4c4729a5e8c30ea1222b584e159b4a45c24b48..6f8d444eb0e3e90e8e0f59f94400a051381b2639 100644 (file)
@@ -55,7 +55,7 @@ static struct list_head global_has_mode;
 static struct fb_ops vmlfb_ops;
 static struct vml_sys *subsys = NULL;
 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,
        0, FB_VMODE_NONINTERLACED
 };
@@ -1044,7 +1044,7 @@ static struct fb_ops vmlfb_ops = {
        .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)},
        {0}
 };
index 1d28e16888e9c00685ac69cb57cc7a7224bfcdc5..77774d8abf94dff3bb24d94552630a9ecb63c754 100644 (file)
@@ -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),
          .driver_data = UNICHROME_CLE266 },
        { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_K400_DID),
index dd0f18e42d3e5e6ec645c4c61348a90f6dc9c511..5cac871db3ee2f7a58973964780df68a7ee4772f 100644 (file)
@@ -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_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_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,
@@ -888,7 +888,7 @@ fail:
 
 /* 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)},
        {0, 0, 0, 0, 0, 0, 0}
 };
index 17dc119c7a9849e6b98c296f245f19e93a833256..8628829b470df5b39c98e9329cd7e4d1fca1c7ac 100644 (file)
@@ -41,7 +41,6 @@
 
 #define DRIVER_NAME            "xilinxfb"
 
-
 /*
  * 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
@@ -92,15 +91,16 @@ struct xilinxfb_platform_data {
        u32 xvirt, yvirt;       /* resolution of memory buffer */
 
        /* 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;
 };
 
 /*
  * Default xilinxfb configuration
  */
-static struct xilinxfb_platform_data xilinx_fb_default_pdata = {
+static const struct xilinxfb_platform_data xilinx_fb_default_pdata = {
        .xres = 640,
        .yres = 480,
        .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
  */
-static struct fb_fix_screeninfo xilinx_fb_fix = {
+static const struct fb_fix_screeninfo xilinx_fb_fix = {
        .id =           "Xilinx",
        .type =         FB_TYPE_PACKED_PIXELS,
        .visual =       FB_VISUAL_TRUECOLOR,
        .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,
 
        .red =          { RED_SHIFT, 8, 0 },
@@ -128,18 +128,18 @@ static struct fb_var_screeninfo xilinx_fb_var = {
        .activate =     FB_ACTIVATE_NOW
 };
 
-
 #define BUS_ACCESS_FLAG                0x1 /* 1 = BUS, 0 = DCR */
 #define LITTLE_ENDIAN_ACCESS   0x2 /* LITTLE ENDIAN IO functions */
 
 struct xilinxfb_drvdata {
-
        struct fb_info  info;           /* FB driver info record */
 
        phys_addr_t     regs_phys;      /* phys. address of the control
-                                               registers */
+                                        * registers
+                                        */
        void __iomem    *regs;          /* virt. address of the control
-                                               registers */
+                                        * registers
+                                        */
 #ifdef CONFIG_PPC_DCR
        dcr_host_t      dcr_host;
        unsigned int    dcr_len;
@@ -148,7 +148,7 @@ struct xilinxfb_drvdata {
        dma_addr_t      fb_phys;        /* phys. address of the frame buffer */
        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;
 
@@ -165,7 +165,7 @@ struct xilinxfb_drvdata {
  * which bus its connected and call the appropriate write API.
  */
 static void xilinx_fb_out32(struct xilinxfb_drvdata *drvdata, u32 offset,
-                               u32 val)
+                           u32 val)
 {
        if (drvdata->flags & BUS_ACCESS_FLAG) {
                if (drvdata->flags & LITTLE_ENDIAN_ACCESS)
@@ -195,8 +195,8 @@ static u32 xilinx_fb_in32(struct xilinxfb_drvdata *drvdata, u32 offset)
 }
 
 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;
 
@@ -205,9 +205,11 @@ xilinx_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue,
 
        if (fbi->var.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 */
@@ -241,13 +243,11 @@ xilinx_fb_blank(int blank_mode, struct fb_info *fbi)
                xilinx_fb_out32(drvdata, REG_CTRL, 0);
        default:
                break;
-
        }
        return 0; /* success */
 }
 
-static struct fb_ops xilinxfb_ops =
-{
+static struct fb_ops xilinxfb_ops = {
        .owner                  = THIS_MODULE,
        .fb_setcolreg           = xilinx_fb_setcolreg,
        .fb_blank               = xilinx_fb_blank,
@@ -286,7 +286,8 @@ static int xilinxfb_assign(struct platform_device *pdev,
        } else {
                drvdata->fb_alloced = 1;
                drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(fbsize),
-                                       &drvdata->fb_phys, GFP_KERNEL);
+                                                     &drvdata->fb_phys,
+                                                     GFP_KERNEL);
        }
 
        if (!drvdata->fb_virt) {
@@ -300,7 +301,7 @@ static int xilinxfb_assign(struct platform_device *pdev,
        /* Tell the hardware where the frame buffer is */
        xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys);
        rc = xilinx_fb_in32(drvdata, REG_FB_ADDR);
-       /* Endianess detection */
+       /* Endianness detection */
        if (rc != drvdata->fb_phys) {
                drvdata->flags |= LITTLE_ENDIAN_ACCESS;
                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;
        if (pdata->rotate_screen)
                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 */
        drvdata->info.device = dev;
@@ -364,7 +364,7 @@ err_regfb:
 err_cmap:
        if (drvdata->fb_alloced)
                dma_free_coherent(dev, PAGE_ALIGN(fbsize), drvdata->fb_virt,
-                       drvdata->fb_phys);
+                                 drvdata->fb_phys);
        else
                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
         * otherwise fill the dcr_host structure.
         */
-       if (tft_access) {
+       if (tft_access)
                drvdata->flags |= BUS_ACCESS_FLAG;
-       }
 #ifdef CONFIG_PPC_DCR
        else {
                int start;
+
                start = dcr_resource_start(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);
@@ -452,19 +452,19 @@ static int xilinxfb_of_probe(struct platform_device *pdev)
 #endif
 
        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_height_mm = prop[1];
        }
 
        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.yres = prop[1];
        }
 
        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.yvirt = prop[1];
        }
@@ -482,7 +482,7 @@ static int xilinxfb_of_remove(struct platform_device *op)
 }
 
 /* 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-2.00.a", },
        { .compatible = "xlnx,xps-tft-2.01.a", },
index 32b0a75434333b4d8678d95be1fca0e8289e4eb3..8ce0a99bf17ccf0fcb549639ff530dbfd5e0471c 100644 (file)
@@ -31,8 +31,7 @@ static int parse_timing_property(const struct device_node *np, const char *name,
 
        prop = of_find_property(np, name, &length);
        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;
        }
 
@@ -44,8 +43,7 @@ static int parse_timing_property(const struct device_node *np, const char *name,
        } else if (cells == 3) {
                ret = of_property_read_u32_array(np, name, &result->min, cells);
        } 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;
        }
 
@@ -105,8 +103,7 @@ static int of_parse_display_timing(const struct device_node *np,
                dt->flags |= DISPLAY_FLAGS_DOUBLECLK;
 
        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;
        }
 
@@ -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);
        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;
        }
 
@@ -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");
        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;
        }
 
        disp = kzalloc(sizeof(*disp), GFP_KERNEL);
        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;
        }
 
@@ -172,28 +166,25 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
                entry = of_get_next_child(timings_np, NULL);
        /* if there is no child, it is useless to go on */
        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;
        }
 
-       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;
 
        disp->num_timings = of_get_child_count(timings_np);
        if (disp->num_timings == 0) {
                /* 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;
        }
 
        disp->timings = kzalloc(sizeof(struct display_timing *) *
                                disp->num_timings, GFP_KERNEL);
        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;
        }
 
@@ -206,8 +197,8 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
 
                dt = kzalloc(sizeof(*dt), GFP_KERNEL);
                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;
                }
 
@@ -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
                         * 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);
                        goto timingfail;
                }
@@ -236,8 +227,8 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
         */
        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);
 
        return disp;
index b5102aa6090d111e25727f78422c8cbc183f086a..9b5f9de88fec8e5f707337285e41dc9edfb7c4c1 100644 (file)
@@ -36,7 +36,7 @@ int of_get_videomode(struct device_node *np, struct videomode *vm,
 
        disp = of_get_display_timings(np);
        if (!disp) {
-               pr_err("%s: no timings specified\n", of_node_full_name(np));
+               pr_err("%pOF: no timings specified\n", np);
                return -EINVAL;
        }
 
index a964d076b4dceb93dd50e8cbc30e16bf8922824a..f4386b0ccf4010dcbfcabd8e499734fd0aa3aaed 100644 (file)
@@ -400,7 +400,7 @@ struct fb_tile_ops {
 #endif /* CONFIG_FB_TILEBLITTING */
 
 /* 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
        /* When FBINFO_HWACCEL_DISABLED is set:
         *  Hardware acceleration is turned off.  Software implementations
@@ -533,14 +533,6 @@ static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
        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
 
 /* This will go away
diff --git a/include/linux/fbcon.h b/include/linux/fbcon.h
new file mode 100644 (file)
index 0000000..f68a7db
--- /dev/null
@@ -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 */