Commit 2b9c272c authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'fbdev-v5.1' of git://github.com/bzolnier/linux

Pull fbdev updates from Bartlomiej Zolnierkiewicz:
 "Just a couple of small fixes and cleanups:

   - fix memory access if logo is bigger than the screen (Manfred
     Schlaegl)

   - silence fbcon logo on 'quiet' boots (Prarit Bhargava)

   - use kvmalloc() for scrollback buffer in fbcon (Konstantin Khorenko)

   - misc fixes (Colin Ian King, YueHaibing, Matteo Croce, Mathieu
     Malaterre, Anders Roxell, Arnd Bergmann)

   - misc cleanups (Rob Herring, Lubomir Rintel, Greg Kroah-Hartman,
     Jani Nikula, Michal Vokáč)"

* tag 'fbdev-v5.1' of git://github.com/bzolnier/linux:
  fbdev: mbx: fix a misspelled variable name
  fbdev: omap2: fix warnings in dss core
  video: fbdev: Fix potential NULL pointer dereference
  fbcon: Silence fbcon logo on 'quiet' boots
  printk: Export console_printk
  ARM: dts: imx28-cfa10036: Fix the reset gpio signal polarity
  video: ssd1307fb: Do not hard code active-low reset sequence
  dt-bindings: display: ssd1307fb: Remove reset-active-low from examples
  fbdev: fbmem: fix memory access if logo is bigger than the screen
  video/fbdev: refactor video= cmdline parsing
  fbdev: mbx: fix up debugfs file creation
  fbdev: omap2: no need to check return value of debugfs_create functions
  video: fbdev: geode: remove ifdef OLPC noise
  video: offb: annotate implicit fall throughs
  omapfb: fix typo
  fbdev: Use of_node_name_eq for node name comparisons
  fbcon: use kvmalloc() for scrollback buffer
  fbdev: chipsfb: remove set but not used variable 'size'
  fbdev/via: fix spelling mistake "Expandsion" -> "Expansion"
parents 51b1ac0f 9a9f1d1a
...@@ -36,7 +36,6 @@ ssd1307: oled@3c { ...@@ -36,7 +36,6 @@ ssd1307: oled@3c {
reg = <0x3c>; reg = <0x3c>;
pwms = <&pwm 4 3000>; pwms = <&pwm 4 3000>;
reset-gpios = <&gpio2 7>; reset-gpios = <&gpio2 7>;
reset-active-low;
}; };
ssd1306: oled@3c { ssd1306: oled@3c {
...@@ -44,7 +43,6 @@ ssd1306: oled@3c { ...@@ -44,7 +43,6 @@ ssd1306: oled@3c {
reg = <0x3c>; reg = <0x3c>;
pwms = <&pwm 4 3000>; pwms = <&pwm 4 3000>;
reset-gpios = <&gpio2 7>; reset-gpios = <&gpio2 7>;
reset-active-low;
solomon,com-lrremap; solomon,com-lrremap;
solomon,com-invdir; solomon,com-invdir;
solomon,com-offset = <32>; solomon,com-offset = <32>;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
/dts-v1/; /dts-v1/;
#include "imx28.dtsi" #include "imx28.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ { / {
model = "Crystalfontz CFA-10036 Board"; model = "Crystalfontz CFA-10036 Board";
...@@ -96,7 +97,7 @@ ssd1306: oled@3c { ...@@ -96,7 +97,7 @@ ssd1306: oled@3c {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&ssd1306_cfa10036>; pinctrl-0 = <&ssd1306_cfa10036>;
reg = <0x3c>; reg = <0x3c>;
reset-gpios = <&gpio2 7 0>; reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
solomon,height = <32>; solomon,height = <32>;
solomon,width = <128>; solomon,width = <128>;
solomon,page-offset = <0>; solomon,page-offset = <0>;
......
...@@ -2844,8 +2844,8 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlis ...@@ -2844,8 +2844,8 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlis
* in some desktop G4s), Via (M9+ chip on iBook G4) and * in some desktop G4s), Via (M9+ chip on iBook G4) and
* Snowy (M11 chip on iBook G4 manufactured after July 2005) * Snowy (M11 chip on iBook G4 manufactured after July 2005)
*/ */
if (!strcmp(rinfo->of_node->name, "ATY,JasperParent") || if (of_node_name_eq(rinfo->of_node, "ATY,JasperParent") ||
!strcmp(rinfo->of_node->name, "ATY,SnowyParent")) { of_node_name_eq(rinfo->of_node, "ATY,SnowyParent")) {
rinfo->reinit_func = radeon_reinitialize_M10; rinfo->reinit_func = radeon_reinitialize_M10;
rinfo->pm_mode |= radeon_pm_off; rinfo->pm_mode |= radeon_pm_off;
} }
...@@ -2855,7 +2855,7 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlis ...@@ -2855,7 +2855,7 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlis
rinfo->pm_mode |= radeon_pm_off; rinfo->pm_mode |= radeon_pm_off;
} }
#endif #endif
if (!strcmp(rinfo->of_node->name, "ATY,ViaParent")) { if (of_node_name_eq(rinfo->of_node, "ATY,ViaParent")) {
rinfo->reinit_func = radeon_reinitialize_M9P; rinfo->reinit_func = radeon_reinitialize_M9P;
rinfo->pm_mode |= radeon_pm_off; rinfo->pm_mode |= radeon_pm_off;
} }
......
...@@ -486,8 +486,8 @@ static int cg14_probe(struct platform_device *op) ...@@ -486,8 +486,8 @@ static int cg14_probe(struct platform_device *op)
info->var.xres); info->var.xres);
info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres); info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres);
if (!strcmp(dp->parent->name, "sbus") || if (of_node_name_eq(dp->parent, "sbus") ||
!strcmp(dp->parent->name, "sbi")) { of_node_name_eq(dp->parent, "sbi")) {
info->fix.smem_start = op->resource[0].start; info->fix.smem_start = op->resource[0].start;
par->iospace = op->resource[0].flags & IORESOURCE_BITS; par->iospace = op->resource[0].flags & IORESOURCE_BITS;
} else { } else {
......
...@@ -369,7 +369,7 @@ static int cg3_probe(struct platform_device *op) ...@@ -369,7 +369,7 @@ static int cg3_probe(struct platform_device *op)
info->var.red.length = 8; info->var.red.length = 8;
info->var.green.length = 8; info->var.green.length = 8;
info->var.blue.length = 8; info->var.blue.length = 8;
if (!strcmp(dp->name, "cgRDI")) if (of_node_name_eq(dp, "cgRDI"))
par->flags |= CG3_FLAG_RDI; par->flags |= CG3_FLAG_RDI;
if (par->flags & CG3_FLAG_RDI) if (par->flags & CG3_FLAG_RDI)
cg3_rdi_maybe_fixup_var(&info->var, dp); cg3_rdi_maybe_fixup_var(&info->var, dp);
......
...@@ -349,7 +349,7 @@ static void init_chips(struct fb_info *p, unsigned long addr) ...@@ -349,7 +349,7 @@ static void init_chips(struct fb_info *p, unsigned long addr)
static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent)
{ {
struct fb_info *p; struct fb_info *p;
unsigned long addr, size; unsigned long addr;
unsigned short cmd; unsigned short cmd;
int rc = -ENODEV; int rc = -ENODEV;
...@@ -361,7 +361,6 @@ static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) ...@@ -361,7 +361,6 @@ static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent)
if ((dp->resource[0].flags & IORESOURCE_MEM) == 0) if ((dp->resource[0].flags & IORESOURCE_MEM) == 0)
goto err_disable; goto err_disable;
addr = pci_resource_start(dp, 0); addr = pci_resource_start(dp, 0);
size = pci_resource_len(dp, 0);
if (addr == 0) if (addr == 0)
goto err_disable; goto err_disable;
......
...@@ -75,36 +75,33 @@ EXPORT_SYMBOL(fb_get_options); ...@@ -75,36 +75,33 @@ EXPORT_SYMBOL(fb_get_options);
* NOTE: This function is a __setup and __init function. * NOTE: This function is a __setup and __init function.
* It only stores the options. Drivers have to call * It only stores the options. Drivers have to call
* fb_get_options() as necessary. * fb_get_options() as necessary.
*
* Returns zero.
*
*/ */
static int __init video_setup(char *options) static int __init video_setup(char *options)
{ {
int i, global = 0;
if (!options || !*options) if (!options || !*options)
global = 1; goto out;
if (!global && !strncmp(options, "ofonly", 6)) { if (!strncmp(options, "ofonly", 6)) {
ofonly = 1; ofonly = 1;
global = 1; goto out;
} }
if (!global && !strchr(options, ':')) { if (strchr(options, ':')) {
fb_mode_option = options; /* named */
global = 1; int i;
}
if (!global) {
for (i = 0; i < FB_MAX; i++) { for (i = 0; i < FB_MAX; i++) {
if (video_options[i] == NULL) { if (video_options[i] == NULL) {
video_options[i] = options; video_options[i] = options;
break; break;
} }
} }
} else {
/* global */
fb_mode_option = options;
} }
out:
return 1; return 1;
} }
__setup("video=", video_setup); __setup("video=", video_setup);
...@@ -656,11 +656,14 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info, ...@@ -656,11 +656,14 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info,
kfree(save); kfree(save);
} }
if (logo_shown == FBCON_LOGO_DONTSHOW)
return;
if (logo_lines > vc->vc_bottom) { if (logo_lines > vc->vc_bottom) {
logo_shown = FBCON_LOGO_CANSHOW; logo_shown = FBCON_LOGO_CANSHOW;
printk(KERN_INFO printk(KERN_INFO
"fbcon_init: disable boot-logo (boot-logo bigger than screen).\n"); "fbcon_init: disable boot-logo (boot-logo bigger than screen).\n");
} else if (logo_shown != FBCON_LOGO_DONTSHOW) { } else {
logo_shown = FBCON_LOGO_DRAW; logo_shown = FBCON_LOGO_DRAW;
vc->vc_top = logo_lines; vc->vc_top = logo_lines;
} }
...@@ -999,7 +1002,7 @@ static const char *fbcon_startup(void) ...@@ -999,7 +1002,7 @@ static const char *fbcon_startup(void)
if (!softback_buf) { if (!softback_buf) {
softback_buf = softback_buf =
(unsigned long) (unsigned long)
kmalloc(fbcon_softback_size, kvmalloc(fbcon_softback_size,
GFP_KERNEL); GFP_KERNEL);
if (!softback_buf) { if (!softback_buf) {
fbcon_softback_size = 0; fbcon_softback_size = 0;
...@@ -1008,7 +1011,7 @@ static const char *fbcon_startup(void) ...@@ -1008,7 +1011,7 @@ static const char *fbcon_startup(void)
} }
} else { } else {
if (softback_buf) { if (softback_buf) {
kfree((void *) softback_buf); kvfree((void *) softback_buf);
softback_buf = 0; softback_buf = 0;
softback_top = 0; softback_top = 0;
} }
...@@ -1066,6 +1069,9 @@ static void fbcon_init(struct vc_data *vc, int init) ...@@ -1066,6 +1069,9 @@ static void fbcon_init(struct vc_data *vc, int init)
cap = info->flags; cap = info->flags;
if (console_loglevel <= CONSOLE_LOGLEVEL_QUIET)
logo_shown = FBCON_LOGO_DONTSHOW;
if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW || if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW ||
(info->fix.type == FB_TYPE_TEXT)) (info->fix.type == FB_TYPE_TEXT))
logo = 0; logo = 0;
...@@ -3672,7 +3678,7 @@ static void fbcon_exit(void) ...@@ -3672,7 +3678,7 @@ static void fbcon_exit(void)
} }
#endif #endif
kfree((void *)softback_buf); kvfree((void *)softback_buf);
softback_buf = 0UL; softback_buf = 0UL;
for_each_registered_fb(i) { for_each_registered_fb(i) {
......
...@@ -431,6 +431,9 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image, ...@@ -431,6 +431,9 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
{ {
unsigned int x; unsigned int x;
if (image->width > info->var.xres || image->height > info->var.yres)
return;
if (rotate == FB_ROTATE_UR) { if (rotate == FB_ROTATE_UR) {
for (x = 0; for (x = 0;
x < num && image->dx + image->width <= info->var.xres; x < num && image->dx + image->width <= info->var.xres;
......
...@@ -978,6 +978,8 @@ void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs) ...@@ -978,6 +978,8 @@ void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
get_monspecs(edid, specs); get_monspecs(edid, specs);
specs->modedb = fb_create_modedb(edid, &specs->modedb_len, specs); specs->modedb = fb_create_modedb(edid, &specs->modedb_len, specs);
if (!specs->modedb)
return;
/* /*
* Workaround for buggy EDIDs that sets that the first * Workaround for buggy EDIDs that sets that the first
......
...@@ -944,7 +944,7 @@ static int ffb_probe(struct platform_device *op) ...@@ -944,7 +944,7 @@ static int ffb_probe(struct platform_device *op)
info->var.accel_flags = FB_ACCELF_TEXT; info->var.accel_flags = FB_ACCELF_TEXT;
if (!strcmp(dp->name, "SUNW,afb")) if (of_node_name_eq(dp, "SUNW,afb"))
par->flags |= FFB_FLAG_AFB; par->flags |= FFB_FLAG_AFB;
par->board_type = of_getintprop_default(dp, "board_type", 0); par->board_type = of_getintprop_default(dp, "board_type", 0);
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/cs5535.h> #include <linux/cs5535.h>
#include <asm/olpc.h>
#include "gxfb.h" #include "gxfb.h"
static char *mode_option; static char *mode_option;
...@@ -107,9 +109,6 @@ static struct fb_videomode gx_modedb[] = { ...@@ -107,9 +109,6 @@ static struct fb_videomode gx_modedb[] = {
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
}; };
#ifdef CONFIG_OLPC
#include <asm/olpc.h>
static struct fb_videomode gx_dcon_modedb[] = { static struct fb_videomode gx_dcon_modedb[] = {
/* The only mode the DCON has is 1200x900 */ /* The only mode the DCON has is 1200x900 */
{ NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3, { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3,
...@@ -128,14 +127,6 @@ static void get_modedb(struct fb_videomode **modedb, unsigned int *size) ...@@ -128,14 +127,6 @@ static void get_modedb(struct fb_videomode **modedb, unsigned int *size)
} }
} }
#else
static void get_modedb(struct fb_videomode **modedb, unsigned int *size)
{
*modedb = (struct fb_videomode *) gx_modedb;
*size = ARRAY_SIZE(gx_modedb);
}
#endif
static int gxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) static int gxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
{ {
if (var->xres > 1600 || var->yres > 1200) if (var->xres > 1600 || var->yres > 1200)
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/olpc.h>
#include "lxfb.h" #include "lxfb.h"
static char *mode_option; static char *mode_option;
...@@ -216,9 +218,6 @@ static struct fb_videomode geode_modedb[] = { ...@@ -216,9 +218,6 @@ static struct fb_videomode geode_modedb[] = {
0, FB_VMODE_NONINTERLACED, 0 }, 0, FB_VMODE_NONINTERLACED, 0 },
}; };
#ifdef CONFIG_OLPC
#include <asm/olpc.h>
static struct fb_videomode olpc_dcon_modedb[] = { static struct fb_videomode olpc_dcon_modedb[] = {
/* The only mode the DCON has is 1200x900 */ /* The only mode the DCON has is 1200x900 */
{ NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3, { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3,
...@@ -237,14 +236,6 @@ static void get_modedb(struct fb_videomode **modedb, unsigned int *size) ...@@ -237,14 +236,6 @@ static void get_modedb(struct fb_videomode **modedb, unsigned int *size)
} }
} }
#else
static void get_modedb(struct fb_videomode **modedb, unsigned int *size)
{
*modedb = (struct fb_videomode *) geode_modedb;
*size = ARRAY_SIZE(geode_modedb);
}
#endif
static int lxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) static int lxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
{ {
if (var->xres > 1920 || var->yres > 1440) if (var->xres > 1920 || var->yres > 1440)
......
...@@ -1497,8 +1497,8 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1497,8 +1497,8 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
switch (pdev->device) { switch (pdev->device) {
case PCI_DEVICE_ID_IMS_TT128: /* IMS,tt128mbA */ case PCI_DEVICE_ID_IMS_TT128: /* IMS,tt128mbA */
par->ramdac = IBM; par->ramdac = IBM;
if (dp && ((strcmp(dp->name, "IMS,tt128mb8") == 0) || if (of_node_name_eq(dp, "IMS,tt128mb8") ||
(strcmp(dp->name, "IMS,tt128mb8A") == 0))) of_node_name_eq(dp, "IMS,tt128mb8A"))
par->ramdac = TVP; par->ramdac = TVP;
break; break;
case PCI_DEVICE_ID_IMS_TT3D: /* IMS,tt3d */ case PCI_DEVICE_ID_IMS_TT3D: /* IMS,tt3d */
......
...@@ -211,36 +211,22 @@ static const struct file_operations misc_fops = { ...@@ -211,36 +211,22 @@ static const struct file_operations misc_fops = {
static void mbxfb_debugfs_init(struct fb_info *fbi) static void mbxfb_debugfs_init(struct fb_info *fbi)
{ {
struct mbxfb_info *mfbi = fbi->par; struct mbxfb_info *mfbi = fbi->par;
struct mbxfb_debugfs_data *dbg; struct dentry *dir;
dbg = kzalloc(sizeof(struct mbxfb_debugfs_data), GFP_KERNEL); dir = debugfs_create_dir("mbxfb", NULL);
mfbi->debugfs_data = dbg; mfbi->debugfs_dir = dir;
dbg->dir = debugfs_create_dir("mbxfb", NULL); debugfs_create_file("sysconf", 0444, dir, fbi, &sysconf_fops);
dbg->sysconf = debugfs_create_file("sysconf", 0444, dbg->dir, debugfs_create_file("clock", 0444, dir, fbi, &clock_fops);
fbi, &sysconf_fops); debugfs_create_file("display", 0444, dir, fbi, &display_fops);
dbg->clock = debugfs_create_file("clock", 0444, dbg->dir, debugfs_create_file("gsctl", 0444, dir, fbi, &gsctl_fops);
fbi, &clock_fops); debugfs_create_file("sdram", 0444, dir, fbi, &sdram_fops);
dbg->display = debugfs_create_file("display", 0444, dbg->dir, debugfs_create_file("misc", 0444, dir, fbi, &misc_fops);
fbi, &display_fops);
dbg->gsctl = debugfs_create_file("gsctl", 0444, dbg->dir,
fbi, &gsctl_fops);
dbg->sdram = debugfs_create_file("sdram", 0444, dbg->dir,
fbi, &sdram_fops);
dbg->misc = debugfs_create_file("misc", 0444, dbg->dir,
fbi, &misc_fops);
} }
static void mbxfb_debugfs_remove(struct fb_info *fbi) static void mbxfb_debugfs_remove(struct fb_info *fbi)
{ {
struct mbxfb_info *mfbi = fbi->par; struct mbxfb_info *mfbi = fbi->par;
struct mbxfb_debugfs_data *dbg = mfbi->debugfs_data;
debugfs_remove_recursive(mfbi->debugfs_dir);
debugfs_remove(dbg->misc);
debugfs_remove(dbg->sdram);
debugfs_remove(dbg->gsctl);
debugfs_remove(dbg->display);
debugfs_remove(dbg->clock);
debugfs_remove(dbg->sysconf);
debugfs_remove(dbg->dir);
} }
...@@ -74,7 +74,7 @@ struct mbxfb_info { ...@@ -74,7 +74,7 @@ struct mbxfb_info {
u32 pseudo_palette[MAX_PALETTES]; u32 pseudo_palette[MAX_PALETTES];
#ifdef CONFIG_FB_MBX_DEBUG #ifdef CONFIG_FB_MBX_DEBUG
void *debugfs_data; struct dentry *debugfs_dir;
#endif #endif
}; };
......
...@@ -141,6 +141,7 @@ static int offb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, ...@@ -141,6 +141,7 @@ static int offb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
/* Clear PALETTE_ACCESS_CNTL in DAC_CNTL */ /* Clear PALETTE_ACCESS_CNTL in DAC_CNTL */
out_le32(par->cmap_adr + 0x58, out_le32(par->cmap_adr + 0x58,
in_le32(par->cmap_adr + 0x58) & ~0x20); in_le32(par->cmap_adr + 0x58) & ~0x20);
/* fall through */
case cmap_r128: case cmap_r128:
/* Set palette index & data */ /* Set palette index & data */
out_8(par->cmap_adr + 0xb0, regno); out_8(par->cmap_adr + 0xb0, regno);
...@@ -210,6 +211,7 @@ static int offb_blank(int blank, struct fb_info *info) ...@@ -210,6 +211,7 @@ static int offb_blank(int blank, struct fb_info *info)
/* Clear PALETTE_ACCESS_CNTL in DAC_CNTL */ /* Clear PALETTE_ACCESS_CNTL in DAC_CNTL */
out_le32(par->cmap_adr + 0x58, out_le32(par->cmap_adr + 0x58,
in_le32(par->cmap_adr + 0x58) & ~0x20); in_le32(par->cmap_adr + 0x58) & ~0x20);
/* fall through */
case cmap_r128: case cmap_r128:
/* Set palette index & data */ /* Set palette index & data */
out_8(par->cmap_adr + 0xb0, i); out_8(par->cmap_adr + 0xb0, i);
...@@ -646,7 +648,7 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node) ...@@ -646,7 +648,7 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)
} }
#endif #endif
/* kludge for valkyrie */ /* kludge for valkyrie */
if (strcmp(dp->name, "valkyrie") == 0) if (of_node_name_eq(dp, "valkyrie"))
address += 0x1000; address += 0x1000;
offb_init_fb(no_real_node ? "bootx" : NULL, offb_init_fb(no_real_node ? "bootx" : NULL,
width, height, depth, pitch, address, width, height, depth, pitch, address,
......
...@@ -110,19 +110,12 @@ DEFINE_SHOW_ATTRIBUTE(dss); ...@@ -110,19 +110,12 @@ DEFINE_SHOW_ATTRIBUTE(dss);
static struct dentry *dss_debugfs_dir; static struct dentry *dss_debugfs_dir;
static int dss_initialize_debugfs(void) static void dss_initialize_debugfs(void)
{ {
dss_debugfs_dir = debugfs_create_dir("omapdss", NULL); dss_debugfs_dir = debugfs_create_dir("omapdss", NULL);
if (IS_ERR(dss_debugfs_dir)) {
int err = PTR_ERR(dss_debugfs_dir);
dss_debugfs_dir = NULL;
return err;
}
debugfs_create_file("clk", S_IRUGO, dss_debugfs_dir, debugfs_create_file("clk", S_IRUGO, dss_debugfs_dir,
&dss_debug_dump_clocks, &dss_fops); &dss_debug_dump_clocks, &dss_fops);
return 0;
} }
static void dss_uninitialize_debugfs(void) static void dss_uninitialize_debugfs(void)
...@@ -130,26 +123,19 @@ static void dss_uninitialize_debugfs(void) ...@@ -130,26 +123,19 @@ static void dss_uninitialize_debugfs(void)
debugfs_remove_recursive(dss_debugfs_dir); debugfs_remove_recursive(dss_debugfs_dir);
} }
int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *))
{ {
struct dentry *d; debugfs_create_file(name, S_IRUGO, dss_debugfs_dir, write, &dss_fops);
d = debugfs_create_file(name, S_IRUGO, dss_debugfs_dir,
write, &dss_fops);
return PTR_ERR_OR_ZERO(d);
} }
#else /* CONFIG_FB_OMAP2_DSS_DEBUGFS */ #else /* CONFIG_FB_OMAP2_DSS_DEBUGFS */
static inline int dss_initialize_debugfs(void) static inline void dss_initialize_debugfs(void)
{ {
return 0;
} }
static inline void dss_uninitialize_debugfs(void) static inline void dss_uninitialize_debugfs(void)
{ {
} }
int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *))
{ {
return 0;
} }
#endif /* CONFIG_FB_OMAP2_DSS_DEBUGFS */ #endif /* CONFIG_FB_OMAP2_DSS_DEBUGFS */
...@@ -182,15 +168,11 @@ static struct notifier_block omap_dss_pm_notif_block = { ...@@ -182,15 +168,11 @@ static struct notifier_block omap_dss_pm_notif_block = {
static int __init omap_dss_probe(struct platform_device *pdev) static int __init omap_dss_probe(struct platform_device *pdev)
{ {
int r;
core.pdev = pdev; core.pdev = pdev;
dss_features_init(omapdss_get_version()); dss_features_init(omapdss_get_version());
r = dss_initialize_debugfs(); dss_initialize_debugfs();
if (r)
goto err_debugfs;
if (def_disp_name) if (def_disp_name)
core.default_display_name = def_disp_name; core.default_display_name = def_disp_name;
...@@ -198,10 +180,6 @@ static int __init omap_dss_probe(struct platform_device *pdev) ...@@ -198,10 +180,6 @@ static int __init omap_dss_probe(struct platform_device *pdev)
register_pm_notifier(&omap_dss_pm_notif_block); register_pm_notifier(&omap_dss_pm_notif_block);
return 0; return 0;
err_debugfs:
return r;
} }
static int omap_dss_remove(struct platform_device *pdev) static int omap_dss_remove(struct platform_device *pdev)
......
...@@ -60,7 +60,7 @@ omapdss_of_get_next_port(const struct device_node *parent, ...@@ -60,7 +60,7 @@ omapdss_of_get_next_port(const struct device_node *parent,
return NULL; return NULL;
} }
prev = port; prev = port;
} while (of_node_cmp(port->name, "port") != 0); } while (!of_node_name_eq(port, "port"));
of_node_put(ports); of_node_put(ports);
} }
...@@ -83,7 +83,7 @@ omapdss_of_get_next_endpoint(const struct device_node *parent, ...@@ -83,7 +83,7 @@ omapdss_of_get_next_endpoint(const struct device_node *parent,
if (!ep) if (!ep)
return NULL; return NULL;
prev = ep; prev = ep;
} while (of_node_cmp(ep->name, "endpoint") != 0); } while (!of_node_name_eq(ep, "endpoint"));
return ep; return ep;
} }
......
...@@ -214,7 +214,7 @@ struct platform_device *dss_get_core_pdev(void); ...@@ -214,7 +214,7 @@ struct platform_device *dss_get_core_pdev(void);
int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask); int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask);
void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask); void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask);
int dss_set_min_bus_tput(struct device *dev, unsigned long tput); int dss_set_min_bus_tput(struct device *dev, unsigned long tput);
int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)); void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *));
/* display */ /* display */
int dss_suspend_all_devices(void); int dss_suspend_all_devices(void);
......
...@@ -712,7 +712,7 @@ int hdmi4_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp, ...@@ -712,7 +712,7 @@ int hdmi4_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp,
else else
acore.i2s_cfg.justification = HDMI_AUDIO_JUSTIFY_RIGHT; acore.i2s_cfg.justification = HDMI_AUDIO_JUSTIFY_RIGHT;
/* /*
* The I2S input word length is twice the lenght given in the IEC-60958 * The I2S input word length is twice the length given in the IEC-60958
* status word. If the word size is greater than * status word. If the word size is greater than
* 20 bits, increment by one. * 20 bits, increment by one.
*/ */
......
...@@ -667,10 +667,10 @@ static int ssd1307fb_probe(struct i2c_client *client, ...@@ -667,10 +667,10 @@ static int ssd1307fb_probe(struct i2c_client *client,
if (par->reset) { if (par->reset) {
/* Reset the screen */ /* Reset the screen */
gpiod_set_value_cansleep(par->reset, 0);
udelay(4);
gpiod_set_value_cansleep(par->reset, 1); gpiod_set_value_cansleep(par->reset, 1);
udelay(4); udelay(4);
gpiod_set_value_cansleep(par->reset, 0);
udelay(4);
} }
if (par->vbat_reg) { if (par->vbat_reg) {
......
...@@ -2110,7 +2110,7 @@ MODULE_PARM_DESC(viafb_lcd_panel_id, ...@@ -2110,7 +2110,7 @@ MODULE_PARM_DESC(viafb_lcd_panel_id,
module_param(viafb_lcd_dsp_method, int, S_IRUSR); module_param(viafb_lcd_dsp_method, int, S_IRUSR);
MODULE_PARM_DESC(viafb_lcd_dsp_method, MODULE_PARM_DESC(viafb_lcd_dsp_method,
"Set Flat Panel display scaling method.(Default=Expandsion)"); "Set Flat Panel display scaling method.(Default=Expansion)");
module_param(viafb_SAMM_ON, int, S_IRUSR); module_param(viafb_SAMM_ON, int, S_IRUSR);
MODULE_PARM_DESC(viafb_SAMM_ON, MODULE_PARM_DESC(viafb_SAMM_ON,
......
...@@ -65,6 +65,7 @@ int console_printk[4] = { ...@@ -65,6 +65,7 @@ int console_printk[4] = {
CONSOLE_LOGLEVEL_MIN, /* minimum_console_loglevel */ CONSOLE_LOGLEVEL_MIN, /* minimum_console_loglevel */
CONSOLE_LOGLEVEL_DEFAULT, /* default_console_loglevel */ CONSOLE_LOGLEVEL_DEFAULT, /* default_console_loglevel */
}; };
EXPORT_SYMBOL_GPL(console_printk);
atomic_t ignore_console_lock_warning __read_mostly = ATOMIC_INIT(0); atomic_t ignore_console_lock_warning __read_mostly = ATOMIC_INIT(0);
EXPORT_SYMBOL(ignore_console_lock_warning); EXPORT_SYMBOL(ignore_console_lock_warning);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment