Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'fbdev-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux

Pull fbdev updates from Tomi Valkeinen:
"Minor fixes and cleanups"

* tag 'fbdev-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
video: fbdev: atmel_lcdfb: remove useless include
video: fbdev: pxa168fb: Use devm_clk_get
fbdev: ssd1307fb: fix error return code
fbdev: fix snprintf() limit in show_bl_curve()
video: fbdev: s3c-fb: Constify platform_device_id
video: fbdev: atmel: fix warning for const return value
video: fbdev: Drop owner assignment from platform_driver
video: fbdev: Drop owner assignment from i2c_driver
fbdev: remove unnecessary memset in vfb
framebuffer: disable vgacon on microblaze arch
fbdev: udlfb: remove unneeded initialization in few places
fbdev: Allow compile test of GPIO consumers if !GPIOLIB
fbdev: fix cea_modes array size

+28 -39
+1 -1
drivers/video/console/Kconfig
··· 9 9 depends on !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && \ 10 10 !SUPERH && !BLACKFIN && !AVR32 && !MN10300 && !CRIS && \ 11 11 (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \ 12 - !ARM64 && !ARC 12 + !ARM64 && !ARC && !MICROBLAZE 13 13 default y 14 14 help 15 15 Saying Y here will allow you to use Linux in text mode through a
+1 -1
drivers/video/fbdev/Kconfig
··· 2464 2464 tristate "Solomon SSD1307 framebuffer support" 2465 2465 depends on FB && I2C 2466 2466 depends on OF 2467 - depends on GPIOLIB 2467 + depends on GPIOLIB || COMPILE_TEST 2468 2468 select FB_SYS_FOPS 2469 2469 select FB_SYS_FILLRECT 2470 2470 select FB_SYS_COPYAREA
+1 -2
drivers/video/fbdev/atmel_lcdfb.c
··· 19 19 #include <linux/backlight.h> 20 20 #include <linux/gfp.h> 21 21 #include <linux/module.h> 22 - #include <linux/platform_data/atmel.h> 23 22 #include <linux/of.h> 24 23 #include <linux/of_device.h> 25 24 #include <linux/of_gpio.h> ··· 998 999 [ATMEL_LCDC_WIRING_RGB] = "RGB", 999 1000 }; 1000 1001 1001 - const int atmel_lcdfb_get_of_wiring_modes(struct device_node *np) 1002 + static int atmel_lcdfb_get_of_wiring_modes(struct device_node *np) 1002 1003 { 1003 1004 const char *mode; 1004 1005 int err, i;
+2 -2
drivers/video/fbdev/core/fbmon.c
··· 1072 1072 1073 1073 for (i = specs->modedb_len + num; i < specs->modedb_len + num + svd_n; i++) { 1074 1074 int idx = svd[i - specs->modedb_len - num]; 1075 - if (!idx || idx > 63) { 1075 + if (!idx || idx >= ARRAY_SIZE(cea_modes)) { 1076 1076 pr_warning("Reserved SVD code %d\n", idx); 1077 - } else if (idx > ARRAY_SIZE(cea_modes) || !cea_modes[idx].xres) { 1077 + } else if (!cea_modes[idx].xres) { 1078 1078 pr_warning("Unimplemented SVD code %d\n", idx); 1079 1079 } else { 1080 1080 memcpy(&m[i], cea_modes + idx, sizeof(m[i]));
+1 -1
drivers/video/fbdev/core/fbsysfs.c
··· 485 485 486 486 mutex_lock(&fb_info->bl_curve_mutex); 487 487 for (i = 0; i < FB_BACKLIGHT_LEVELS; i += 8) 488 - len += snprintf(&buf[len], PAGE_SIZE, "%8ph\n", 488 + len += scnprintf(&buf[len], PAGE_SIZE - len, "%8ph\n", 489 489 fb_info->bl_curve + i); 490 490 mutex_unlock(&fb_info->bl_curve_mutex); 491 491
+1 -1
drivers/video/fbdev/core/modedb.c
··· 289 289 }; 290 290 291 291 #ifdef CONFIG_FB_MODE_HELPERS 292 - const struct fb_videomode cea_modes[64] = { 292 + const struct fb_videomode cea_modes[65] = { 293 293 /* #1: 640x480p@59.94/60Hz */ 294 294 [1] = { 295 295 NULL, 60, 640, 480, 39722, 48, 16, 33, 10, 96, 2, 0,
-1
drivers/video/fbdev/omap2/displays-new/encoder-opa362.c
··· 266 266 .remove = __exit_p(opa362_remove), 267 267 .driver = { 268 268 .name = "amplifier-opa362", 269 - .owner = THIS_MODULE, 270 269 .of_match_table = opa362_of_match, 271 270 .suppress_bind_attrs = true, 272 271 },
+4 -10
drivers/video/fbdev/pxa168fb.c
··· 615 615 return -EINVAL; 616 616 } 617 617 618 - clk = clk_get(&pdev->dev, "LCDCLK"); 618 + clk = devm_clk_get(&pdev->dev, "LCDCLK"); 619 619 if (IS_ERR(clk)) { 620 620 dev_err(&pdev->dev, "unable to get LCDCLK"); 621 621 return PTR_ERR(clk); ··· 624 624 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 625 625 if (res == NULL) { 626 626 dev_err(&pdev->dev, "no IO memory defined\n"); 627 - ret = -ENOENT; 628 - goto failed_put_clk; 627 + return -ENOENT; 629 628 } 630 629 631 630 irq = platform_get_irq(pdev, 0); 632 631 if (irq < 0) { 633 632 dev_err(&pdev->dev, "no IRQ defined\n"); 634 - ret = -ENOENT; 635 - goto failed_put_clk; 633 + return -ENOENT; 636 634 } 637 635 638 636 info = framebuffer_alloc(sizeof(struct pxa168fb_info), &pdev->dev); 639 637 if (info == NULL) { 640 - ret = -ENOMEM; 641 - goto failed_put_clk; 638 + return -ENOMEM; 642 639 } 643 640 644 641 /* Initialize private data */ ··· 773 776 info->screen_base, fbi->fb_start_dma); 774 777 failed_free_info: 775 778 kfree(info); 776 - failed_put_clk: 777 - clk_put(clk); 778 779 779 780 dev_err(&pdev->dev, "frame buffer device init failed with %d\n", ret); 780 781 return ret; ··· 808 813 info->screen_base, info->fix.smem_start); 809 814 810 815 clk_disable(fbi->clk); 811 - clk_put(fbi->clk); 812 816 813 817 framebuffer_release(info); 814 818
+1 -1
drivers/video/fbdev/s3c-fb.c
··· 1938 1938 }, 1939 1939 }; 1940 1940 1941 - static struct platform_device_id s3c_fb_driver_ids[] = { 1941 + static const struct platform_device_id s3c_fb_driver_ids[] = { 1942 1942 { 1943 1943 .name = "s3c-fb", 1944 1944 .driver_data = (unsigned long)&s3c_fb_data_64xx,
+3 -3
drivers/video/fbdev/ssd1307fb.c
··· 656 656 bl = backlight_device_register(bl_name, &client->dev, par, 657 657 &ssd1307fb_bl_ops, NULL); 658 658 if (IS_ERR(bl)) { 659 - dev_err(&client->dev, "unable to register backlight device: %ld\n", 660 - PTR_ERR(bl)); 659 + ret = PTR_ERR(bl); 660 + dev_err(&client->dev, "unable to register backlight device: %d\n", 661 + ret); 661 662 goto bl_init_error; 662 663 } 663 664 ··· 720 719 .driver = { 721 720 .name = "ssd1307fb", 722 721 .of_match_table = ssd1307fb_of_match, 723 - .owner = THIS_MODULE, 724 722 }, 725 723 }; 726 724
+4 -6
drivers/video/fbdev/udlfb.c
··· 279 279 { 280 280 char *buf; 281 281 char *wrptr; 282 - int retval = 0; 282 + int retval; 283 283 int writesize; 284 284 struct urb *urb; 285 285 ··· 1505 1505 char *desc; 1506 1506 char *buf; 1507 1507 char *desc_end; 1508 - 1509 - int total_len = 0; 1508 + int total_len; 1510 1509 1511 1510 buf = kzalloc(MAX_VENDOR_DESCRIPTOR_SIZE, GFP_KERNEL); 1512 1511 if (!buf) ··· 1581 1582 const struct usb_device_id *id) 1582 1583 { 1583 1584 struct usb_device *usbdev; 1584 - struct dlfb_data *dev = NULL; 1585 + struct dlfb_data *dev; 1585 1586 int retval = -ENOMEM; 1586 1587 1587 1588 /* usb initialization */ ··· 1664 1665 /* allocates framebuffer driver structure, not framebuffer memory */ 1665 1666 info = framebuffer_alloc(0, dev->gdev); 1666 1667 if (!info) { 1667 - retval = -ENOMEM; 1668 1668 pr_err("framebuffer_alloc failed\n"); 1669 1669 goto error; 1670 1670 } ··· 1910 1912 1911 1913 static struct urb *dlfb_get_urb(struct dlfb_data *dev) 1912 1914 { 1913 - int ret = 0; 1915 + int ret; 1914 1916 struct list_head *entry; 1915 1917 struct urb_node *unode; 1916 1918 struct urb *urb = NULL;
+8 -9
drivers/video/fbdev/vfb.c
··· 51 51 if (!mem) 52 52 return NULL; 53 53 54 - memset(mem, 0, size); /* Clear the ram out, no junk to the user */ 54 + /* 55 + * VFB must clear memory to prevent kernel info 56 + * leakage into userspace 57 + * VGA-based drivers MUST NOT clear memory if 58 + * they want to be able to take over vgacon 59 + */ 60 + 61 + memset(mem, 0, size); 55 62 adr = (unsigned long) mem; 56 63 while (size > 0) { 57 64 SetPageReserved(vmalloc_to_page((void *)adr)); ··· 496 489 */ 497 490 if (!(videomemory = rvmalloc(videomemorysize))) 498 491 return retval; 499 - 500 - /* 501 - * VFB must clear memory to prevent kernel info 502 - * leakage into userspace 503 - * VGA-based drivers MUST NOT clear memory if 504 - * they want to be able to take over vgacon 505 - */ 506 - memset(videomemory, 0, videomemorysize); 507 492 508 493 info = framebuffer_alloc(sizeof(u32) * 256, &dev->dev); 509 494 if (!info)
+1 -1
include/linux/fb.h
··· 788 788 789 789 extern const char *fb_mode_option; 790 790 extern const struct fb_videomode vesa_modes[]; 791 - extern const struct fb_videomode cea_modes[64]; 791 + extern const struct fb_videomode cea_modes[65]; 792 792 extern const struct dmt_videomode dmt_modes[]; 793 793 794 794 struct fb_modelist {