diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-15 17:22:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-15 17:22:59 -0400 |
commit | 2b9c272cf5cd81708e51b4ce3e432ce9566cfa47 (patch) | |
tree | 64e9a3ad1492b3697a3e88bd665901e2105202f2 | |
parent | 51b1ac0fa2403d1db009189122c17b7c1ea37b33 (diff) | |
parent | 9a9f1d1a81a972513636c333e26c542f8aebae55 (diff) |
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"
24 files changed, 72 insertions, 117 deletions
diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt index 209d931ef16c..b67f8caa212c 100644 --- a/Documentation/devicetree/bindings/display/ssd1307fb.txt +++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt | |||
@@ -36,7 +36,6 @@ ssd1307: oled@3c { | |||
36 | reg = <0x3c>; | 36 | reg = <0x3c>; |
37 | pwms = <&pwm 4 3000>; | 37 | pwms = <&pwm 4 3000>; |
38 | reset-gpios = <&gpio2 7>; | 38 | reset-gpios = <&gpio2 7>; |
39 | reset-active-low; | ||
40 | }; | 39 | }; |
41 | 40 | ||
42 | ssd1306: oled@3c { | 41 | ssd1306: oled@3c { |
@@ -44,7 +43,6 @@ ssd1306: oled@3c { | |||
44 | reg = <0x3c>; | 43 | reg = <0x3c>; |
45 | pwms = <&pwm 4 3000>; | 44 | pwms = <&pwm 4 3000>; |
46 | reset-gpios = <&gpio2 7>; | 45 | reset-gpios = <&gpio2 7>; |
47 | reset-active-low; | ||
48 | solomon,com-lrremap; | 46 | solomon,com-lrremap; |
49 | solomon,com-invdir; | 47 | solomon,com-invdir; |
50 | solomon,com-offset = <32>; | 48 | solomon,com-offset = <32>; |
diff --git a/arch/arm/boot/dts/imx28-cfa10036.dts b/arch/arm/boot/dts/imx28-cfa10036.dts index d3e3622979c5..de48b5808ef6 100644 --- a/arch/arm/boot/dts/imx28-cfa10036.dts +++ b/arch/arm/boot/dts/imx28-cfa10036.dts | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | /dts-v1/; | 12 | /dts-v1/; |
13 | #include "imx28.dtsi" | 13 | #include "imx28.dtsi" |
14 | #include <dt-bindings/gpio/gpio.h> | ||
14 | 15 | ||
15 | / { | 16 | / { |
16 | model = "Crystalfontz CFA-10036 Board"; | 17 | model = "Crystalfontz CFA-10036 Board"; |
@@ -96,7 +97,7 @@ | |||
96 | pinctrl-names = "default"; | 97 | pinctrl-names = "default"; |
97 | pinctrl-0 = <&ssd1306_cfa10036>; | 98 | pinctrl-0 = <&ssd1306_cfa10036>; |
98 | reg = <0x3c>; | 99 | reg = <0x3c>; |
99 | reset-gpios = <&gpio2 7 0>; | 100 | reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; |
100 | solomon,height = <32>; | 101 | solomon,height = <32>; |
101 | solomon,width = <128>; | 102 | solomon,width = <128>; |
102 | solomon,page-offset = <0>; | 103 | solomon,page-offset = <0>; |
diff --git a/drivers/video/fbdev/aty/radeon_pm.c b/drivers/video/fbdev/aty/radeon_pm.c index e695adb0e573..2dc5703eac51 100644 --- a/drivers/video/fbdev/aty/radeon_pm.c +++ b/drivers/video/fbdev/aty/radeon_pm.c | |||
@@ -2844,8 +2844,8 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlis | |||
2844 | * in some desktop G4s), Via (M9+ chip on iBook G4) and | 2844 | * in some desktop G4s), Via (M9+ chip on iBook G4) and |
2845 | * Snowy (M11 chip on iBook G4 manufactured after July 2005) | 2845 | * Snowy (M11 chip on iBook G4 manufactured after July 2005) |
2846 | */ | 2846 | */ |
2847 | if (!strcmp(rinfo->of_node->name, "ATY,JasperParent") || | 2847 | if (of_node_name_eq(rinfo->of_node, "ATY,JasperParent") || |
2848 | !strcmp(rinfo->of_node->name, "ATY,SnowyParent")) { | 2848 | of_node_name_eq(rinfo->of_node, "ATY,SnowyParent")) { |
2849 | rinfo->reinit_func = radeon_reinitialize_M10; | 2849 | rinfo->reinit_func = radeon_reinitialize_M10; |
2850 | rinfo->pm_mode |= radeon_pm_off; | 2850 | rinfo->pm_mode |= radeon_pm_off; |
2851 | } | 2851 | } |
@@ -2855,7 +2855,7 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlis | |||
2855 | rinfo->pm_mode |= radeon_pm_off; | 2855 | rinfo->pm_mode |= radeon_pm_off; |
2856 | } | 2856 | } |
2857 | #endif | 2857 | #endif |
2858 | if (!strcmp(rinfo->of_node->name, "ATY,ViaParent")) { | 2858 | if (of_node_name_eq(rinfo->of_node, "ATY,ViaParent")) { |
2859 | rinfo->reinit_func = radeon_reinitialize_M9P; | 2859 | rinfo->reinit_func = radeon_reinitialize_M9P; |
2860 | rinfo->pm_mode |= radeon_pm_off; | 2860 | rinfo->pm_mode |= radeon_pm_off; |
2861 | } | 2861 | } |
diff --git a/drivers/video/fbdev/cg14.c b/drivers/video/fbdev/cg14.c index 9af54c2368fd..a6dce1a78490 100644 --- a/drivers/video/fbdev/cg14.c +++ b/drivers/video/fbdev/cg14.c | |||
@@ -486,8 +486,8 @@ static int cg14_probe(struct platform_device *op) | |||
486 | info->var.xres); | 486 | info->var.xres); |
487 | info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres); | 487 | info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres); |
488 | 488 | ||
489 | if (!strcmp(dp->parent->name, "sbus") || | 489 | if (of_node_name_eq(dp->parent, "sbus") || |
490 | !strcmp(dp->parent->name, "sbi")) { | 490 | of_node_name_eq(dp->parent, "sbi")) { |
491 | info->fix.smem_start = op->resource[0].start; | 491 | info->fix.smem_start = op->resource[0].start; |
492 | par->iospace = op->resource[0].flags & IORESOURCE_BITS; | 492 | par->iospace = op->resource[0].flags & IORESOURCE_BITS; |
493 | } else { | 493 | } else { |
diff --git a/drivers/video/fbdev/cg3.c b/drivers/video/fbdev/cg3.c index 1bd95b02f3aa..6d42def8436b 100644 --- a/drivers/video/fbdev/cg3.c +++ b/drivers/video/fbdev/cg3.c | |||
@@ -369,7 +369,7 @@ static int cg3_probe(struct platform_device *op) | |||
369 | info->var.red.length = 8; | 369 | info->var.red.length = 8; |
370 | info->var.green.length = 8; | 370 | info->var.green.length = 8; |
371 | info->var.blue.length = 8; | 371 | info->var.blue.length = 8; |
372 | if (!strcmp(dp->name, "cgRDI")) | 372 | if (of_node_name_eq(dp, "cgRDI")) |
373 | par->flags |= CG3_FLAG_RDI; | 373 | par->flags |= CG3_FLAG_RDI; |
374 | if (par->flags & CG3_FLAG_RDI) | 374 | if (par->flags & CG3_FLAG_RDI) |
375 | cg3_rdi_maybe_fixup_var(&info->var, dp); | 375 | cg3_rdi_maybe_fixup_var(&info->var, dp); |
diff --git a/drivers/video/fbdev/chipsfb.c b/drivers/video/fbdev/chipsfb.c index 40182ed85648..ca549e1532e6 100644 --- a/drivers/video/fbdev/chipsfb.c +++ b/drivers/video/fbdev/chipsfb.c | |||
@@ -349,7 +349,7 @@ static void init_chips(struct fb_info *p, unsigned long addr) | |||
349 | static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) | 349 | static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) |
350 | { | 350 | { |
351 | struct fb_info *p; | 351 | struct fb_info *p; |
352 | unsigned long addr, size; | 352 | unsigned long addr; |
353 | unsigned short cmd; | 353 | unsigned short cmd; |
354 | int rc = -ENODEV; | 354 | int rc = -ENODEV; |
355 | 355 | ||
@@ -361,7 +361,6 @@ static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) | |||
361 | if ((dp->resource[0].flags & IORESOURCE_MEM) == 0) | 361 | if ((dp->resource[0].flags & IORESOURCE_MEM) == 0) |
362 | goto err_disable; | 362 | goto err_disable; |
363 | addr = pci_resource_start(dp, 0); | 363 | addr = pci_resource_start(dp, 0); |
364 | size = pci_resource_len(dp, 0); | ||
365 | if (addr == 0) | 364 | if (addr == 0) |
366 | goto err_disable; | 365 | goto err_disable; |
367 | 366 | ||
diff --git a/drivers/video/fbdev/core/fb_cmdline.c b/drivers/video/fbdev/core/fb_cmdline.c index 39509ccd92f1..3b5bd666b952 100644 --- a/drivers/video/fbdev/core/fb_cmdline.c +++ b/drivers/video/fbdev/core/fb_cmdline.c | |||
@@ -75,36 +75,33 @@ EXPORT_SYMBOL(fb_get_options); | |||
75 | * NOTE: This function is a __setup and __init function. | 75 | * NOTE: This function is a __setup and __init function. |
76 | * It only stores the options. Drivers have to call | 76 | * It only stores the options. Drivers have to call |
77 | * fb_get_options() as necessary. | 77 | * fb_get_options() as necessary. |
78 | * | ||
79 | * Returns zero. | ||
80 | * | ||
81 | */ | 78 | */ |
82 | static int __init video_setup(char *options) | 79 | static int __init video_setup(char *options) |
83 | { | 80 | { |
84 | int i, global = 0; | ||
85 | |||
86 | if (!options || !*options) | 81 | if (!options || !*options) |
87 | global = 1; | 82 | goto out; |
88 | 83 | ||
89 | if (!global && !strncmp(options, "ofonly", 6)) { | 84 | if (!strncmp(options, "ofonly", 6)) { |
90 | ofonly = 1; | 85 | ofonly = 1; |
91 | global = 1; | 86 | goto out; |
92 | } | 87 | } |
93 | 88 | ||
94 | if (!global && !strchr(options, ':')) { | 89 | if (strchr(options, ':')) { |
95 | fb_mode_option = options; | 90 | /* named */ |
96 | global = 1; | 91 | int i; |
97 | } | ||
98 | 92 | ||
99 | if (!global) { | ||
100 | for (i = 0; i < FB_MAX; i++) { | 93 | for (i = 0; i < FB_MAX; i++) { |
101 | if (video_options[i] == NULL) { | 94 | if (video_options[i] == NULL) { |
102 | video_options[i] = options; | 95 | video_options[i] = options; |
103 | break; | 96 | break; |
104 | } | 97 | } |
105 | } | 98 | } |
99 | } else { | ||
100 | /* global */ | ||
101 | fb_mode_option = options; | ||
106 | } | 102 | } |
107 | 103 | ||
104 | out: | ||
108 | return 1; | 105 | return 1; |
109 | } | 106 | } |
110 | __setup("video=", video_setup); | 107 | __setup("video=", video_setup); |
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index bfa1360ec750..cd059a801662 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c | |||
@@ -656,11 +656,14 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info, | |||
656 | kfree(save); | 656 | kfree(save); |
657 | } | 657 | } |
658 | 658 | ||
659 | if (logo_shown == FBCON_LOGO_DONTSHOW) | ||
660 | return; | ||
661 | |||
659 | if (logo_lines > vc->vc_bottom) { | 662 | if (logo_lines > vc->vc_bottom) { |
660 | logo_shown = FBCON_LOGO_CANSHOW; | 663 | logo_shown = FBCON_LOGO_CANSHOW; |
661 | printk(KERN_INFO | 664 | printk(KERN_INFO |
662 | "fbcon_init: disable boot-logo (boot-logo bigger than screen).\n"); | 665 | "fbcon_init: disable boot-logo (boot-logo bigger than screen).\n"); |
663 | } else if (logo_shown != FBCON_LOGO_DONTSHOW) { | 666 | } else { |
664 | logo_shown = FBCON_LOGO_DRAW; | 667 | logo_shown = FBCON_LOGO_DRAW; |
665 | vc->vc_top = logo_lines; | 668 | vc->vc_top = logo_lines; |
666 | } | 669 | } |
@@ -999,7 +1002,7 @@ static const char *fbcon_startup(void) | |||
999 | if (!softback_buf) { | 1002 | if (!softback_buf) { |
1000 | softback_buf = | 1003 | softback_buf = |
1001 | (unsigned long) | 1004 | (unsigned long) |
1002 | kmalloc(fbcon_softback_size, | 1005 | kvmalloc(fbcon_softback_size, |
1003 | GFP_KERNEL); | 1006 | GFP_KERNEL); |
1004 | if (!softback_buf) { | 1007 | if (!softback_buf) { |
1005 | fbcon_softback_size = 0; | 1008 | fbcon_softback_size = 0; |
@@ -1008,7 +1011,7 @@ static const char *fbcon_startup(void) | |||
1008 | } | 1011 | } |
1009 | } else { | 1012 | } else { |
1010 | if (softback_buf) { | 1013 | if (softback_buf) { |
1011 | kfree((void *) softback_buf); | 1014 | kvfree((void *) softback_buf); |
1012 | softback_buf = 0; | 1015 | softback_buf = 0; |
1013 | softback_top = 0; | 1016 | softback_top = 0; |
1014 | } | 1017 | } |
@@ -1066,6 +1069,9 @@ static void fbcon_init(struct vc_data *vc, int init) | |||
1066 | 1069 | ||
1067 | cap = info->flags; | 1070 | cap = info->flags; |
1068 | 1071 | ||
1072 | if (console_loglevel <= CONSOLE_LOGLEVEL_QUIET) | ||
1073 | logo_shown = FBCON_LOGO_DONTSHOW; | ||
1074 | |||
1069 | if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW || | 1075 | if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW || |
1070 | (info->fix.type == FB_TYPE_TEXT)) | 1076 | (info->fix.type == FB_TYPE_TEXT)) |
1071 | logo = 0; | 1077 | logo = 0; |
@@ -3672,7 +3678,7 @@ static void fbcon_exit(void) | |||
3672 | } | 3678 | } |
3673 | #endif | 3679 | #endif |
3674 | 3680 | ||
3675 | kfree((void *)softback_buf); | 3681 | kvfree((void *)softback_buf); |
3676 | softback_buf = 0UL; | 3682 | softback_buf = 0UL; |
3677 | 3683 | ||
3678 | for_each_registered_fb(i) { | 3684 | for_each_registered_fb(i) { |
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index cb43a2258c51..4721491e6c8c 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c | |||
@@ -431,6 +431,9 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image, | |||
431 | { | 431 | { |
432 | unsigned int x; | 432 | unsigned int x; |
433 | 433 | ||
434 | if (image->width > info->var.xres || image->height > info->var.yres) | ||
435 | return; | ||
436 | |||
434 | if (rotate == FB_ROTATE_UR) { | 437 | if (rotate == FB_ROTATE_UR) { |
435 | for (x = 0; | 438 | for (x = 0; |
436 | x < num && image->dx + image->width <= info->var.xres; | 439 | x < num && image->dx + image->width <= info->var.xres; |
diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c index dd3128990776..3558a70a6664 100644 --- a/drivers/video/fbdev/core/fbmon.c +++ b/drivers/video/fbdev/core/fbmon.c | |||
@@ -978,6 +978,8 @@ void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs) | |||
978 | get_monspecs(edid, specs); | 978 | get_monspecs(edid, specs); |
979 | 979 | ||
980 | specs->modedb = fb_create_modedb(edid, &specs->modedb_len, specs); | 980 | specs->modedb = fb_create_modedb(edid, &specs->modedb_len, specs); |
981 | if (!specs->modedb) | ||
982 | return; | ||
981 | 983 | ||
982 | /* | 984 | /* |
983 | * Workaround for buggy EDIDs that sets that the first | 985 | * Workaround for buggy EDIDs that sets that the first |
diff --git a/drivers/video/fbdev/ffb.c b/drivers/video/fbdev/ffb.c index 6b1915872af1..b7aee0c427a8 100644 --- a/drivers/video/fbdev/ffb.c +++ b/drivers/video/fbdev/ffb.c | |||
@@ -944,7 +944,7 @@ static int ffb_probe(struct platform_device *op) | |||
944 | 944 | ||
945 | info->var.accel_flags = FB_ACCELF_TEXT; | 945 | info->var.accel_flags = FB_ACCELF_TEXT; |
946 | 946 | ||
947 | if (!strcmp(dp->name, "SUNW,afb")) | 947 | if (of_node_name_eq(dp, "SUNW,afb")) |
948 | par->flags |= FFB_FLAG_AFB; | 948 | par->flags |= FFB_FLAG_AFB; |
949 | 949 | ||
950 | par->board_type = of_getintprop_default(dp, "board_type", 0); | 950 | par->board_type = of_getintprop_default(dp, "board_type", 0); |
diff --git a/drivers/video/fbdev/geode/gxfb_core.c b/drivers/video/fbdev/geode/gxfb_core.c index f4f76373b2a8..b1906cf5a8f0 100644 --- a/drivers/video/fbdev/geode/gxfb_core.c +++ b/drivers/video/fbdev/geode/gxfb_core.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
34 | #include <linux/cs5535.h> | 34 | #include <linux/cs5535.h> |
35 | 35 | ||
36 | #include <asm/olpc.h> | ||
37 | |||
36 | #include "gxfb.h" | 38 | #include "gxfb.h" |
37 | 39 | ||
38 | static char *mode_option; | 40 | static char *mode_option; |
@@ -107,9 +109,6 @@ static struct fb_videomode gx_modedb[] = { | |||
107 | FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, | 109 | FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, |
108 | }; | 110 | }; |
109 | 111 | ||
110 | #ifdef CONFIG_OLPC | ||
111 | #include <asm/olpc.h> | ||
112 | |||
113 | static struct fb_videomode gx_dcon_modedb[] = { | 112 | static struct fb_videomode gx_dcon_modedb[] = { |
114 | /* The only mode the DCON has is 1200x900 */ | 113 | /* The only mode the DCON has is 1200x900 */ |
115 | { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3, | 114 | { 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 | } | 127 | } |
129 | } | 128 | } |
130 | 129 | ||
131 | #else | ||
132 | static void get_modedb(struct fb_videomode **modedb, unsigned int *size) | ||
133 | { | ||
134 | *modedb = (struct fb_videomode *) gx_modedb; | ||
135 | *size = ARRAY_SIZE(gx_modedb); | ||
136 | } | ||
137 | #endif | ||
138 | |||
139 | static int gxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | 130 | static int gxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) |
140 | { | 131 | { |
141 | if (var->xres > 1600 || var->yres > 1200) | 132 | if (var->xres > 1600 || var->yres > 1200) |
diff --git a/drivers/video/fbdev/geode/lxfb_core.c b/drivers/video/fbdev/geode/lxfb_core.c index 138da6cb6cbc..17ab905811b1 100644 --- a/drivers/video/fbdev/geode/lxfb_core.c +++ b/drivers/video/fbdev/geode/lxfb_core.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/uaccess.h> | 24 | #include <linux/uaccess.h> |
25 | 25 | ||
26 | #include <asm/olpc.h> | ||
27 | |||
26 | #include "lxfb.h" | 28 | #include "lxfb.h" |
27 | 29 | ||
28 | static char *mode_option; | 30 | static char *mode_option; |
@@ -216,9 +218,6 @@ static struct fb_videomode geode_modedb[] = { | |||
216 | 0, FB_VMODE_NONINTERLACED, 0 }, | 218 | 0, FB_VMODE_NONINTERLACED, 0 }, |
217 | }; | 219 | }; |
218 | 220 | ||
219 | #ifdef CONFIG_OLPC | ||
220 | #include <asm/olpc.h> | ||
221 | |||
222 | static struct fb_videomode olpc_dcon_modedb[] = { | 221 | static struct fb_videomode olpc_dcon_modedb[] = { |
223 | /* The only mode the DCON has is 1200x900 */ | 222 | /* The only mode the DCON has is 1200x900 */ |
224 | { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3, | 223 | { 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 | } | 236 | } |
238 | } | 237 | } |
239 | 238 | ||
240 | #else | ||
241 | static void get_modedb(struct fb_videomode **modedb, unsigned int *size) | ||
242 | { | ||
243 | *modedb = (struct fb_videomode *) geode_modedb; | ||
244 | *size = ARRAY_SIZE(geode_modedb); | ||
245 | } | ||
246 | #endif | ||
247 | |||
248 | static int lxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | 239 | static int lxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) |
249 | { | 240 | { |
250 | if (var->xres > 1920 || var->yres > 1440) | 241 | if (var->xres > 1920 || var->yres > 1440) |
diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c index 5d9670daf60e..4b9615e4ce74 100644 --- a/drivers/video/fbdev/imsttfb.c +++ b/drivers/video/fbdev/imsttfb.c | |||
@@ -1497,8 +1497,8 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1497 | switch (pdev->device) { | 1497 | switch (pdev->device) { |
1498 | case PCI_DEVICE_ID_IMS_TT128: /* IMS,tt128mbA */ | 1498 | case PCI_DEVICE_ID_IMS_TT128: /* IMS,tt128mbA */ |
1499 | par->ramdac = IBM; | 1499 | par->ramdac = IBM; |
1500 | if (dp && ((strcmp(dp->name, "IMS,tt128mb8") == 0) || | 1500 | if (of_node_name_eq(dp, "IMS,tt128mb8") || |
1501 | (strcmp(dp->name, "IMS,tt128mb8A") == 0))) | 1501 | of_node_name_eq(dp, "IMS,tt128mb8A")) |
1502 | par->ramdac = TVP; | 1502 | par->ramdac = TVP; |
1503 | break; | 1503 | break; |
1504 | case PCI_DEVICE_ID_IMS_TT3D: /* IMS,tt3d */ | 1504 | case PCI_DEVICE_ID_IMS_TT3D: /* IMS,tt3d */ |
diff --git a/drivers/video/fbdev/mbx/mbxdebugfs.c b/drivers/video/fbdev/mbx/mbxdebugfs.c index 2bd328883178..09af721638fb 100644 --- a/drivers/video/fbdev/mbx/mbxdebugfs.c +++ b/drivers/video/fbdev/mbx/mbxdebugfs.c | |||
@@ -211,36 +211,22 @@ static const struct file_operations misc_fops = { | |||
211 | static void mbxfb_debugfs_init(struct fb_info *fbi) | 211 | static void mbxfb_debugfs_init(struct fb_info *fbi) |
212 | { | 212 | { |
213 | struct mbxfb_info *mfbi = fbi->par; | 213 | struct mbxfb_info *mfbi = fbi->par; |
214 | struct mbxfb_debugfs_data *dbg; | 214 | struct dentry *dir; |
215 | 215 | ||
216 | dbg = kzalloc(sizeof(struct mbxfb_debugfs_data), GFP_KERNEL); | 216 | dir = debugfs_create_dir("mbxfb", NULL); |
217 | mfbi->debugfs_data = dbg; | 217 | mfbi->debugfs_dir = dir; |
218 | 218 | ||
219 | dbg->dir = debugfs_create_dir("mbxfb", NULL); | 219 | debugfs_create_file("sysconf", 0444, dir, fbi, &sysconf_fops); |
220 | dbg->sysconf = debugfs_create_file("sysconf", 0444, dbg->dir, | 220 | debugfs_create_file("clock", 0444, dir, fbi, &clock_fops); |
221 | fbi, &sysconf_fops); | 221 | debugfs_create_file("display", 0444, dir, fbi, &display_fops); |
222 | dbg->clock = debugfs_create_file("clock", 0444, dbg->dir, | 222 | debugfs_create_file("gsctl", 0444, dir, fbi, &gsctl_fops); |
223 | fbi, &clock_fops); | 223 | debugfs_create_file("sdram", 0444, dir, fbi, &sdram_fops); |
224 | dbg->display = debugfs_create_file("display", 0444, dbg->dir, | 224 | debugfs_create_file("misc", 0444, dir, fbi, &misc_fops); |
225 | fbi, &display_fops); | ||
226 | dbg->gsctl = debugfs_create_file("gsctl", 0444, dbg->dir, | ||
227 | fbi, &gsctl_fops); | ||
228 | dbg->sdram = debugfs_create_file("sdram", 0444, dbg->dir, | ||
229 | fbi, &sdram_fops); | ||
230 | dbg->misc = debugfs_create_file("misc", 0444, dbg->dir, | ||
231 | fbi, &misc_fops); | ||
232 | } | 225 | } |
233 | 226 | ||
234 | static void mbxfb_debugfs_remove(struct fb_info *fbi) | 227 | static void mbxfb_debugfs_remove(struct fb_info *fbi) |
235 | { | 228 | { |
236 | struct mbxfb_info *mfbi = fbi->par; | 229 | struct mbxfb_info *mfbi = fbi->par; |
237 | struct mbxfb_debugfs_data *dbg = mfbi->debugfs_data; | 230 | |
238 | 231 | debugfs_remove_recursive(mfbi->debugfs_dir); | |
239 | debugfs_remove(dbg->misc); | ||
240 | debugfs_remove(dbg->sdram); | ||
241 | debugfs_remove(dbg->gsctl); | ||
242 | debugfs_remove(dbg->display); | ||
243 | debugfs_remove(dbg->clock); | ||
244 | debugfs_remove(dbg->sysconf); | ||
245 | debugfs_remove(dbg->dir); | ||
246 | } | 232 | } |
diff --git a/drivers/video/fbdev/mbx/mbxfb.c b/drivers/video/fbdev/mbx/mbxfb.c index 539b85da0897..6ded480a69b4 100644 --- a/drivers/video/fbdev/mbx/mbxfb.c +++ b/drivers/video/fbdev/mbx/mbxfb.c | |||
@@ -74,7 +74,7 @@ struct mbxfb_info { | |||
74 | 74 | ||
75 | u32 pseudo_palette[MAX_PALETTES]; | 75 | u32 pseudo_palette[MAX_PALETTES]; |
76 | #ifdef CONFIG_FB_MBX_DEBUG | 76 | #ifdef CONFIG_FB_MBX_DEBUG |
77 | void *debugfs_data; | 77 | struct dentry *debugfs_dir; |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | }; | 80 | }; |
diff --git a/drivers/video/fbdev/offb.c b/drivers/video/fbdev/offb.c index 057d3cdef92e..fbc6eafb63c7 100644 --- a/drivers/video/fbdev/offb.c +++ b/drivers/video/fbdev/offb.c | |||
@@ -141,6 +141,7 @@ static int offb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | |||
141 | /* Clear PALETTE_ACCESS_CNTL in DAC_CNTL */ | 141 | /* Clear PALETTE_ACCESS_CNTL in DAC_CNTL */ |
142 | out_le32(par->cmap_adr + 0x58, | 142 | out_le32(par->cmap_adr + 0x58, |
143 | in_le32(par->cmap_adr + 0x58) & ~0x20); | 143 | in_le32(par->cmap_adr + 0x58) & ~0x20); |
144 | /* fall through */ | ||
144 | case cmap_r128: | 145 | case cmap_r128: |
145 | /* Set palette index & data */ | 146 | /* Set palette index & data */ |
146 | out_8(par->cmap_adr + 0xb0, regno); | 147 | out_8(par->cmap_adr + 0xb0, regno); |
@@ -210,6 +211,7 @@ static int offb_blank(int blank, struct fb_info *info) | |||
210 | /* Clear PALETTE_ACCESS_CNTL in DAC_CNTL */ | 211 | /* Clear PALETTE_ACCESS_CNTL in DAC_CNTL */ |
211 | out_le32(par->cmap_adr + 0x58, | 212 | out_le32(par->cmap_adr + 0x58, |
212 | in_le32(par->cmap_adr + 0x58) & ~0x20); | 213 | in_le32(par->cmap_adr + 0x58) & ~0x20); |
214 | /* fall through */ | ||
213 | case cmap_r128: | 215 | case cmap_r128: |
214 | /* Set palette index & data */ | 216 | /* Set palette index & data */ |
215 | out_8(par->cmap_adr + 0xb0, i); | 217 | 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 | } | 648 | } |
647 | #endif | 649 | #endif |
648 | /* kludge for valkyrie */ | 650 | /* kludge for valkyrie */ |
649 | if (strcmp(dp->name, "valkyrie") == 0) | 651 | if (of_node_name_eq(dp, "valkyrie")) |
650 | address += 0x1000; | 652 | address += 0x1000; |
651 | offb_init_fb(no_real_node ? "bootx" : NULL, | 653 | offb_init_fb(no_real_node ? "bootx" : NULL, |
652 | width, height, depth, pitch, address, | 654 | width, height, depth, pitch, address, |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/core.c b/drivers/video/fbdev/omap2/omapfb/dss/core.c index b4bcf3a4a647..b5956a1a30d4 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/core.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/core.c | |||
@@ -110,19 +110,12 @@ DEFINE_SHOW_ATTRIBUTE(dss); | |||
110 | 110 | ||
111 | static struct dentry *dss_debugfs_dir; | 111 | static struct dentry *dss_debugfs_dir; |
112 | 112 | ||
113 | static int dss_initialize_debugfs(void) | 113 | static void dss_initialize_debugfs(void) |
114 | { | 114 | { |
115 | dss_debugfs_dir = debugfs_create_dir("omapdss", NULL); | 115 | dss_debugfs_dir = debugfs_create_dir("omapdss", NULL); |
116 | if (IS_ERR(dss_debugfs_dir)) { | ||
117 | int err = PTR_ERR(dss_debugfs_dir); | ||
118 | dss_debugfs_dir = NULL; | ||
119 | return err; | ||
120 | } | ||
121 | 116 | ||
122 | debugfs_create_file("clk", S_IRUGO, dss_debugfs_dir, | 117 | debugfs_create_file("clk", S_IRUGO, dss_debugfs_dir, |
123 | &dss_debug_dump_clocks, &dss_fops); | 118 | &dss_debug_dump_clocks, &dss_fops); |
124 | |||
125 | return 0; | ||
126 | } | 119 | } |
127 | 120 | ||
128 | static void dss_uninitialize_debugfs(void) | 121 | static void dss_uninitialize_debugfs(void) |
@@ -130,26 +123,19 @@ static void dss_uninitialize_debugfs(void) | |||
130 | debugfs_remove_recursive(dss_debugfs_dir); | 123 | debugfs_remove_recursive(dss_debugfs_dir); |
131 | } | 124 | } |
132 | 125 | ||
133 | int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) | 126 | void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) |
134 | { | 127 | { |
135 | struct dentry *d; | 128 | debugfs_create_file(name, S_IRUGO, dss_debugfs_dir, write, &dss_fops); |
136 | |||
137 | d = debugfs_create_file(name, S_IRUGO, dss_debugfs_dir, | ||
138 | write, &dss_fops); | ||
139 | |||
140 | return PTR_ERR_OR_ZERO(d); | ||
141 | } | 129 | } |
142 | #else /* CONFIG_FB_OMAP2_DSS_DEBUGFS */ | 130 | #else /* CONFIG_FB_OMAP2_DSS_DEBUGFS */ |
143 | static inline int dss_initialize_debugfs(void) | 131 | static inline void dss_initialize_debugfs(void) |
144 | { | 132 | { |
145 | return 0; | ||
146 | } | 133 | } |
147 | static inline void dss_uninitialize_debugfs(void) | 134 | static inline void dss_uninitialize_debugfs(void) |
148 | { | 135 | { |
149 | } | 136 | } |
150 | int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) | 137 | void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) |
151 | { | 138 | { |
152 | return 0; | ||
153 | } | 139 | } |
154 | #endif /* CONFIG_FB_OMAP2_DSS_DEBUGFS */ | 140 | #endif /* CONFIG_FB_OMAP2_DSS_DEBUGFS */ |
155 | 141 | ||
@@ -182,15 +168,11 @@ static struct notifier_block omap_dss_pm_notif_block = { | |||
182 | 168 | ||
183 | static int __init omap_dss_probe(struct platform_device *pdev) | 169 | static int __init omap_dss_probe(struct platform_device *pdev) |
184 | { | 170 | { |
185 | int r; | ||
186 | |||
187 | core.pdev = pdev; | 171 | core.pdev = pdev; |
188 | 172 | ||
189 | dss_features_init(omapdss_get_version()); | 173 | dss_features_init(omapdss_get_version()); |
190 | 174 | ||
191 | r = dss_initialize_debugfs(); | 175 | dss_initialize_debugfs(); |
192 | if (r) | ||
193 | goto err_debugfs; | ||
194 | 176 | ||
195 | if (def_disp_name) | 177 | if (def_disp_name) |
196 | core.default_display_name = def_disp_name; | 178 | core.default_display_name = def_disp_name; |
@@ -198,10 +180,6 @@ static int __init omap_dss_probe(struct platform_device *pdev) | |||
198 | register_pm_notifier(&omap_dss_pm_notif_block); | 180 | register_pm_notifier(&omap_dss_pm_notif_block); |
199 | 181 | ||
200 | return 0; | 182 | return 0; |
201 | |||
202 | err_debugfs: | ||
203 | |||
204 | return r; | ||
205 | } | 183 | } |
206 | 184 | ||
207 | static int omap_dss_remove(struct platform_device *pdev) | 185 | static int omap_dss_remove(struct platform_device *pdev) |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c index f1eb8b0f8a2a..5ce893c1923d 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | |||
@@ -60,7 +60,7 @@ omapdss_of_get_next_port(const struct device_node *parent, | |||
60 | return NULL; | 60 | return NULL; |
61 | } | 61 | } |
62 | prev = port; | 62 | prev = port; |
63 | } while (of_node_cmp(port->name, "port") != 0); | 63 | } while (!of_node_name_eq(port, "port")); |
64 | 64 | ||
65 | of_node_put(ports); | 65 | of_node_put(ports); |
66 | } | 66 | } |
@@ -83,7 +83,7 @@ omapdss_of_get_next_endpoint(const struct device_node *parent, | |||
83 | if (!ep) | 83 | if (!ep) |
84 | return NULL; | 84 | return NULL; |
85 | prev = ep; | 85 | prev = ep; |
86 | } while (of_node_cmp(ep->name, "endpoint") != 0); | 86 | } while (!of_node_name_eq(ep, "endpoint")); |
87 | 87 | ||
88 | return ep; | 88 | return ep; |
89 | } | 89 | } |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss.h b/drivers/video/fbdev/omap2/omapfb/dss/dss.h index a3cc0ca8f9d2..b1a354494144 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss.h +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss.h | |||
@@ -214,7 +214,7 @@ struct platform_device *dss_get_core_pdev(void); | |||
214 | int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask); | 214 | int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask); |
215 | void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask); | 215 | void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask); |
216 | int dss_set_min_bus_tput(struct device *dev, unsigned long tput); | 216 | int dss_set_min_bus_tput(struct device *dev, unsigned long tput); |
217 | int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)); | 217 | void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)); |
218 | 218 | ||
219 | /* display */ | 219 | /* display */ |
220 | int dss_suspend_all_devices(void); | 220 | int dss_suspend_all_devices(void); |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c index fa72e735dad2..d146793dd044 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c | |||
@@ -712,7 +712,7 @@ int hdmi4_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp, | |||
712 | else | 712 | else |
713 | acore.i2s_cfg.justification = HDMI_AUDIO_JUSTIFY_RIGHT; | 713 | acore.i2s_cfg.justification = HDMI_AUDIO_JUSTIFY_RIGHT; |
714 | /* | 714 | /* |
715 | * The I2S input word length is twice the lenght given in the IEC-60958 | 715 | * The I2S input word length is twice the length given in the IEC-60958 |
716 | * status word. If the word size is greater than | 716 | * status word. If the word size is greater than |
717 | * 20 bits, increment by one. | 717 | * 20 bits, increment by one. |
718 | */ | 718 | */ |
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c index 4061a20cfe24..3b361bc9feb8 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c | |||
@@ -667,10 +667,10 @@ static int ssd1307fb_probe(struct i2c_client *client, | |||
667 | 667 | ||
668 | if (par->reset) { | 668 | if (par->reset) { |
669 | /* Reset the screen */ | 669 | /* Reset the screen */ |
670 | gpiod_set_value_cansleep(par->reset, 0); | ||
671 | udelay(4); | ||
672 | gpiod_set_value_cansleep(par->reset, 1); | 670 | gpiod_set_value_cansleep(par->reset, 1); |
673 | udelay(4); | 671 | udelay(4); |
672 | gpiod_set_value_cansleep(par->reset, 0); | ||
673 | udelay(4); | ||
674 | } | 674 | } |
675 | 675 | ||
676 | if (par->vbat_reg) { | 676 | if (par->vbat_reg) { |
diff --git a/drivers/video/fbdev/via/viafbdev.c b/drivers/video/fbdev/via/viafbdev.c index 7bb7e90b8f00..bdf5a0ea876d 100644 --- a/drivers/video/fbdev/via/viafbdev.c +++ b/drivers/video/fbdev/via/viafbdev.c | |||
@@ -2110,7 +2110,7 @@ MODULE_PARM_DESC(viafb_lcd_panel_id, | |||
2110 | 2110 | ||
2111 | module_param(viafb_lcd_dsp_method, int, S_IRUSR); | 2111 | module_param(viafb_lcd_dsp_method, int, S_IRUSR); |
2112 | MODULE_PARM_DESC(viafb_lcd_dsp_method, | 2112 | MODULE_PARM_DESC(viafb_lcd_dsp_method, |
2113 | "Set Flat Panel display scaling method.(Default=Expandsion)"); | 2113 | "Set Flat Panel display scaling method.(Default=Expansion)"); |
2114 | 2114 | ||
2115 | module_param(viafb_SAMM_ON, int, S_IRUSR); | 2115 | module_param(viafb_SAMM_ON, int, S_IRUSR); |
2116 | MODULE_PARM_DESC(viafb_SAMM_ON, | 2116 | MODULE_PARM_DESC(viafb_SAMM_ON, |
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 6b7654b8001f..02ca827b8fac 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c | |||
@@ -65,6 +65,7 @@ int console_printk[4] = { | |||
65 | CONSOLE_LOGLEVEL_MIN, /* minimum_console_loglevel */ | 65 | CONSOLE_LOGLEVEL_MIN, /* minimum_console_loglevel */ |
66 | CONSOLE_LOGLEVEL_DEFAULT, /* default_console_loglevel */ | 66 | CONSOLE_LOGLEVEL_DEFAULT, /* default_console_loglevel */ |
67 | }; | 67 | }; |
68 | EXPORT_SYMBOL_GPL(console_printk); | ||
68 | 69 | ||
69 | atomic_t ignore_console_lock_warning __read_mostly = ATOMIC_INIT(0); | 70 | atomic_t ignore_console_lock_warning __read_mostly = ATOMIC_INIT(0); |
70 | EXPORT_SYMBOL(ignore_console_lock_warning); | 71 | EXPORT_SYMBOL(ignore_console_lock_warning); |