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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'fbdev-for-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev

Pull fbdev fixes and updates from Helge Deller:
"Mostly just small patches, with the exception of the bigger indenting
cleanups in the sisfb and radeonfb drivers.

Two patches should be mentioned though: A fix-up for fbdev if the
screen resize fails (by Shigeru Yoshida), and a potential divide by
zero fix in fb_pm2fb (by Letu Ren).

Summary:

Major fixes:
- Revert the changes for fbcon console when vc_resize() fails
[Shigeru Yoshida]
- Avoid a potential divide by zero error in fb_pm2fb [Letu Ren]

Minor fixes:
- Add missing pci_disable_device() in chipsfb_pci_init() [Yang
Yingliang]
- Fix tests for platform_get_irq() failure in omapfb [Yu Zhe]
- Destroy mutex on freeing struct fb_info in fbsysfs [Shigeru
Yoshida]

Cleanups:
- Move fbdev drivers from strlcpy to strscpy [Wolfram Sang]
- Indenting fixes, comment fixes, ... [Jiapeng Chong & Jilin Yuan]"

* tag 'fbdev-for-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
fbdev: fbcon: Properly revert changes when vc_resize() failed
fbdev: Move fbdev drivers from strlcpy to strscpy
fbdev: omap: Remove unnecessary print function dev_err()
fbdev: chipsfb: Add missing pci_disable_device() in chipsfb_pci_init()
fbdev: fbcon: Destroy mutex on freeing struct fb_info
fbdev: radeon: Clean up some inconsistent indenting
fbdev: sisfb: Clean up some inconsistent indenting
fbdev: fb_pm2fb: Avoid potential divide by zero error
fbdev: ssd1307fb: Fix repeated words in comments
fbdev: omapfb: Fix tests for platform_get_irq() failure

+240 -201
+1 -1
drivers/video/console/sticore.c
··· 290 290 static int __init sti_setup(char *str) 291 291 { 292 292 if (str) 293 - strlcpy (default_sti_path, str, sizeof (default_sti_path)); 293 + strscpy(default_sti_path, str, sizeof(default_sti_path)); 294 294 295 295 return 1; 296 296 }
+1 -1
drivers/video/fbdev/aty/atyfb_base.c
··· 3891 3891 && (!strncmp(this_opt, "Mach64:", 7))) { 3892 3892 static unsigned char m64_num; 3893 3893 static char mach64_str[80]; 3894 - strlcpy(mach64_str, this_opt + 7, sizeof(mach64_str)); 3894 + strscpy(mach64_str, this_opt + 7, sizeof(mach64_str)); 3895 3895 if (!store_video_par(mach64_str, m64_num)) { 3896 3896 m64_num++; 3897 3897 mach64_count = m64_num;
+21 -21
drivers/video/fbdev/aty/radeon_base.c
··· 1980 1980 info->screen_base = rinfo->fb_base; 1981 1981 info->screen_size = rinfo->mapped_vram; 1982 1982 /* Fill fix common fields */ 1983 - strlcpy(info->fix.id, rinfo->name, sizeof(info->fix.id)); 1983 + strscpy(info->fix.id, rinfo->name, sizeof(info->fix.id)); 1984 1984 info->fix.smem_start = rinfo->fb_base_phys; 1985 1985 info->fix.smem_len = rinfo->video_ram; 1986 1986 info->fix.type = FB_TYPE_PACKED_PIXELS; ··· 2094 2094 u32 tmp; 2095 2095 2096 2096 /* framebuffer size */ 2097 - if ((rinfo->family == CHIP_FAMILY_RS100) || 2097 + if ((rinfo->family == CHIP_FAMILY_RS100) || 2098 2098 (rinfo->family == CHIP_FAMILY_RS200) || 2099 2099 (rinfo->family == CHIP_FAMILY_RS300) || 2100 2100 (rinfo->family == CHIP_FAMILY_RC410) || 2101 2101 (rinfo->family == CHIP_FAMILY_RS400) || 2102 2102 (rinfo->family == CHIP_FAMILY_RS480) ) { 2103 - u32 tom = INREG(NB_TOM); 2104 - tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024); 2103 + u32 tom = INREG(NB_TOM); 2105 2104 2106 - radeon_fifo_wait(6); 2107 - OUTREG(MC_FB_LOCATION, tom); 2108 - OUTREG(DISPLAY_BASE_ADDR, (tom & 0xffff) << 16); 2109 - OUTREG(CRTC2_DISPLAY_BASE_ADDR, (tom & 0xffff) << 16); 2110 - OUTREG(OV0_BASE_ADDR, (tom & 0xffff) << 16); 2105 + tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024); 2106 + radeon_fifo_wait(6); 2107 + OUTREG(MC_FB_LOCATION, tom); 2108 + OUTREG(DISPLAY_BASE_ADDR, (tom & 0xffff) << 16); 2109 + OUTREG(CRTC2_DISPLAY_BASE_ADDR, (tom & 0xffff) << 16); 2110 + OUTREG(OV0_BASE_ADDR, (tom & 0xffff) << 16); 2111 2111 2112 - /* This is supposed to fix the crtc2 noise problem. */ 2113 - OUTREG(GRPH2_BUFFER_CNTL, INREG(GRPH2_BUFFER_CNTL) & ~0x7f0000); 2112 + /* This is supposed to fix the crtc2 noise problem. */ 2113 + OUTREG(GRPH2_BUFFER_CNTL, INREG(GRPH2_BUFFER_CNTL) & ~0x7f0000); 2114 2114 2115 - if ((rinfo->family == CHIP_FAMILY_RS100) || 2116 - (rinfo->family == CHIP_FAMILY_RS200)) { 2117 - /* This is to workaround the asic bug for RMX, some versions 2118 - of BIOS doesn't have this register initialized correctly. 2119 - */ 2120 - OUTREGP(CRTC_MORE_CNTL, CRTC_H_CUTOFF_ACTIVE_EN, 2121 - ~CRTC_H_CUTOFF_ACTIVE_EN); 2122 - } 2123 - } else { 2124 - tmp = INREG(CNFG_MEMSIZE); 2115 + if ((rinfo->family == CHIP_FAMILY_RS100) || 2116 + (rinfo->family == CHIP_FAMILY_RS200)) { 2117 + /* This is to workaround the asic bug for RMX, some versions 2118 + * of BIOS doesn't have this register initialized correctly. 2119 + */ 2120 + OUTREGP(CRTC_MORE_CNTL, CRTC_H_CUTOFF_ACTIVE_EN, 2121 + ~CRTC_H_CUTOFF_ACTIVE_EN); 2122 + } 2123 + } else { 2124 + tmp = INREG(CNFG_MEMSIZE); 2125 2125 } 2126 2126 2127 2127 /* mem size is bits [28:0], mask off the rest */
+1 -1
drivers/video/fbdev/bw2.c
··· 182 182 183 183 static void bw2_init_fix(struct fb_info *info, int linebytes) 184 184 { 185 - strlcpy(info->fix.id, "bwtwo", sizeof(info->fix.id)); 185 + strscpy(info->fix.id, "bwtwo", sizeof(info->fix.id)); 186 186 187 187 info->fix.type = FB_TYPE_PACKED_PIXELS; 188 188 info->fix.visual = FB_VISUAL_MONO01;
+1
drivers/video/fbdev/chipsfb.c
··· 430 430 err_release_fb: 431 431 framebuffer_release(p); 432 432 err_disable: 433 + pci_disable_device(dp); 433 434 err_out: 434 435 return rc; 435 436 }
+1 -1
drivers/video/fbdev/cirrusfb.c
··· 1999 1999 } 2000 2000 2001 2001 /* Fill fix common fields */ 2002 - strlcpy(info->fix.id, cirrusfb_board_info[cinfo->btype].name, 2002 + strscpy(info->fix.id, cirrusfb_board_info[cinfo->btype].name, 2003 2003 sizeof(info->fix.id)); 2004 2004 2005 2005 /* monochrome: only 1 memory plane */
+1 -1
drivers/video/fbdev/clps711x-fb.c
··· 326 326 info->var.vmode = FB_VMODE_NONINTERLACED; 327 327 info->fix.type = FB_TYPE_PACKED_PIXELS; 328 328 info->fix.accel = FB_ACCEL_NONE; 329 - strlcpy(info->fix.id, CLPS711X_FB_NAME, sizeof(info->fix.id)); 329 + strscpy(info->fix.id, CLPS711X_FB_NAME, sizeof(info->fix.id)); 330 330 fb_videomode_to_var(&info->var, &cfb->mode); 331 331 332 332 ret = fb_alloc_cmap(&info->cmap, BIT(CLPS711X_FB_BPP_MAX), 0);
+26 -3
drivers/video/fbdev/core/fbcon.c
··· 412 412 413 413 while ((options = strsep(&this_opt, ",")) != NULL) { 414 414 if (!strncmp(options, "font:", 5)) { 415 - strlcpy(fontname, options + 5, sizeof(fontname)); 415 + strscpy(fontname, options + 5, sizeof(fontname)); 416 416 continue; 417 417 } 418 418 ··· 2401 2401 struct fb_info *info = fbcon_info_from_console(vc->vc_num); 2402 2402 struct fbcon_ops *ops = info->fbcon_par; 2403 2403 struct fbcon_display *p = &fb_display[vc->vc_num]; 2404 - int resize; 2404 + int resize, ret, old_userfont, old_width, old_height, old_charcount; 2405 2405 char *old_data = NULL; 2406 2406 2407 2407 resize = (w != vc->vc_font.width) || (h != vc->vc_font.height); 2408 2408 if (p->userfont) 2409 2409 old_data = vc->vc_font.data; 2410 2410 vc->vc_font.data = (void *)(p->fontdata = data); 2411 + old_userfont = p->userfont; 2411 2412 if ((p->userfont = userfont)) 2412 2413 REFCOUNT(data)++; 2414 + 2415 + old_width = vc->vc_font.width; 2416 + old_height = vc->vc_font.height; 2417 + old_charcount = vc->vc_font.charcount; 2418 + 2413 2419 vc->vc_font.width = w; 2414 2420 vc->vc_font.height = h; 2415 2421 vc->vc_font.charcount = charcount; ··· 2431 2425 rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres); 2432 2426 cols /= w; 2433 2427 rows /= h; 2434 - vc_resize(vc, cols, rows); 2428 + ret = vc_resize(vc, cols, rows); 2429 + if (ret) 2430 + goto err_out; 2435 2431 } else if (con_is_visible(vc) 2436 2432 && vc->vc_mode == KD_TEXT) { 2437 2433 fbcon_clear_margins(vc, 0); ··· 2443 2435 if (old_data && (--REFCOUNT(old_data) == 0)) 2444 2436 kfree(old_data - FONT_EXTRA_WORDS * sizeof(int)); 2445 2437 return 0; 2438 + 2439 + err_out: 2440 + p->fontdata = old_data; 2441 + vc->vc_font.data = (void *)old_data; 2442 + 2443 + if (userfont) { 2444 + p->userfont = old_userfont; 2445 + REFCOUNT(data)--; 2446 + } 2447 + 2448 + vc->vc_font.width = old_width; 2449 + vc->vc_font.height = old_height; 2450 + vc->vc_font.charcount = old_charcount; 2451 + 2452 + return ret; 2446 2453 } 2447 2454 2448 2455 /*
+4
drivers/video/fbdev/core/fbsysfs.c
··· 84 84 if (WARN_ON(refcount_read(&info->count))) 85 85 return; 86 86 87 + #if IS_ENABLED(CONFIG_FB_BACKLIGHT) 88 + mutex_destroy(&info->bl_curve_mutex); 89 + #endif 90 + 87 91 kfree(info->apertures); 88 92 kfree(info); 89 93 }
+4 -4
drivers/video/fbdev/cyber2000fb.c
··· 1134 1134 info->fb_size = int_cfb_info->fb.fix.smem_len; 1135 1135 info->info = int_cfb_info; 1136 1136 1137 - strlcpy(info->dev_name, int_cfb_info->fb.fix.id, 1137 + strscpy(info->dev_name, int_cfb_info->fb.fix.id, 1138 1138 sizeof(info->dev_name)); 1139 1139 } 1140 1140 ··· 1229 1229 1230 1230 static int cyber2000fb_setup_ddc_bus(struct cfb_info *cfb) 1231 1231 { 1232 - strlcpy(cfb->ddc_adapter.name, cfb->fb.fix.id, 1232 + strscpy(cfb->ddc_adapter.name, cfb->fb.fix.id, 1233 1233 sizeof(cfb->ddc_adapter.name)); 1234 1234 cfb->ddc_adapter.owner = THIS_MODULE; 1235 1235 cfb->ddc_adapter.class = I2C_CLASS_DDC; ··· 1304 1304 1305 1305 static int cyber2000fb_i2c_register(struct cfb_info *cfb) 1306 1306 { 1307 - strlcpy(cfb->i2c_adapter.name, cfb->fb.fix.id, 1307 + strscpy(cfb->i2c_adapter.name, cfb->fb.fix.id, 1308 1308 sizeof(cfb->i2c_adapter.name)); 1309 1309 cfb->i2c_adapter.owner = THIS_MODULE; 1310 1310 cfb->i2c_adapter.algo_data = &cfb->i2c_algo; ··· 1500 1500 if (strncmp(opt, "font:", 5) == 0) { 1501 1501 static char default_font_storage[40]; 1502 1502 1503 - strlcpy(default_font_storage, opt + 5, 1503 + strscpy(default_font_storage, opt + 5, 1504 1504 sizeof(default_font_storage)); 1505 1505 default_font = default_font_storage; 1506 1506 continue;
+1 -1
drivers/video/fbdev/ffb.c
··· 883 883 } else 884 884 ffb_type_name = "Elite 3D"; 885 885 886 - strlcpy(info->fix.id, ffb_type_name, sizeof(info->fix.id)); 886 + strscpy(info->fix.id, ffb_type_name, sizeof(info->fix.id)); 887 887 888 888 info->fix.type = FB_TYPE_PACKED_PIXELS; 889 889 info->fix.visual = FB_VISUAL_TRUECOLOR;
+3 -3
drivers/video/fbdev/geode/gx1fb_core.c
··· 410 410 continue; 411 411 412 412 if (!strncmp(this_opt, "mode:", 5)) 413 - strlcpy(mode_option, this_opt + 5, sizeof(mode_option)); 413 + strscpy(mode_option, this_opt + 5, sizeof(mode_option)); 414 414 else if (!strncmp(this_opt, "crt:", 4)) 415 415 crt_option = !!simple_strtoul(this_opt + 4, NULL, 0); 416 416 else if (!strncmp(this_opt, "panel:", 6)) 417 - strlcpy(panel_option, this_opt + 6, sizeof(panel_option)); 417 + strscpy(panel_option, this_opt + 6, sizeof(panel_option)); 418 418 else 419 - strlcpy(mode_option, this_opt, sizeof(mode_option)); 419 + strscpy(mode_option, this_opt, sizeof(mode_option)); 420 420 } 421 421 } 422 422 #endif
+1 -1
drivers/video/fbdev/gxt4500.c
··· 650 650 cardtype = ent->driver_data; 651 651 par->refclk_ps = cardinfo[cardtype].refclk_ps; 652 652 info->fix = gxt4500_fix; 653 - strlcpy(info->fix.id, cardinfo[cardtype].cardname, 653 + strscpy(info->fix.id, cardinfo[cardtype].cardname, 654 654 sizeof(info->fix.id)); 655 655 info->pseudo_palette = par->pseudo_palette; 656 656
+1 -1
drivers/video/fbdev/i740fb.c
··· 159 159 { 160 160 struct i740fb_par *par = info->par; 161 161 162 - strlcpy(par->ddc_adapter.name, info->fix.id, 162 + strscpy(par->ddc_adapter.name, info->fix.id, 163 163 sizeof(par->ddc_adapter.name)); 164 164 par->ddc_adapter.owner = THIS_MODULE; 165 165 par->ddc_adapter.class = I2C_CLASS_DDC;
+1 -1
drivers/video/fbdev/imxfb.c
··· 681 681 682 682 fbi->devtype = pdev->id_entry->driver_data; 683 683 684 - strlcpy(info->fix.id, IMX_NAME, sizeof(info->fix.id)); 684 + strscpy(info->fix.id, IMX_NAME, sizeof(info->fix.id)); 685 685 686 686 info->fix.type = FB_TYPE_PACKED_PIXELS; 687 687 info->fix.type_aux = 0;
+3 -3
drivers/video/fbdev/matrox/matroxfb_base.c
··· 2383 2383 else if (!strncmp(this_opt, "mem:", 4)) 2384 2384 mem = simple_strtoul(this_opt+4, NULL, 0); 2385 2385 else if (!strncmp(this_opt, "mode:", 5)) 2386 - strlcpy(videomode, this_opt+5, sizeof(videomode)); 2386 + strscpy(videomode, this_opt + 5, sizeof(videomode)); 2387 2387 else if (!strncmp(this_opt, "outputs:", 8)) 2388 - strlcpy(outputs, this_opt+8, sizeof(outputs)); 2388 + strscpy(outputs, this_opt + 8, sizeof(outputs)); 2389 2389 else if (!strncmp(this_opt, "dfp:", 4)) { 2390 2390 dfp_type = simple_strtoul(this_opt+4, NULL, 0); 2391 2391 dfp = 1; ··· 2455 2455 else if (!strcmp(this_opt, "dfp")) 2456 2456 dfp = value; 2457 2457 else { 2458 - strlcpy(videomode, this_opt, sizeof(videomode)); 2458 + strscpy(videomode, this_opt, sizeof(videomode)); 2459 2459 } 2460 2460 } 2461 2461 }
+2 -4
drivers/video/fbdev/omap/omapfb_main.c
··· 1642 1642 goto cleanup; 1643 1643 } 1644 1644 fbdev->int_irq = platform_get_irq(pdev, 0); 1645 - if (!fbdev->int_irq) { 1646 - dev_err(&pdev->dev, "unable to get irq\n"); 1645 + if (fbdev->int_irq < 0) { 1647 1646 r = ENXIO; 1648 1647 goto cleanup; 1649 1648 } 1650 1649 1651 1650 fbdev->ext_irq = platform_get_irq(pdev, 1); 1652 - if (!fbdev->ext_irq) { 1653 - dev_err(&pdev->dev, "unable to get irq\n"); 1651 + if (fbdev->ext_irq < 0) { 1654 1652 r = ENXIO; 1655 1653 goto cleanup; 1656 1654 }
+1 -1
drivers/video/fbdev/omap2/omapfb/omapfb-main.c
··· 1331 1331 { 1332 1332 memset(&fbi->var, 0, sizeof(fbi->var)); 1333 1333 memset(&fbi->fix, 0, sizeof(fbi->fix)); 1334 - strlcpy(fbi->fix.id, MODULE_NAME, sizeof(fbi->fix.id)); 1334 + strscpy(fbi->fix.id, MODULE_NAME, sizeof(fbi->fix.id)); 1335 1335 } 1336 1336 1337 1337 static int omapfb_free_all_fbmem(struct omapfb2_device *fbdev)
+5
drivers/video/fbdev/pm2fb.c
··· 617 617 return -EINVAL; 618 618 } 619 619 620 + if (!var->pixclock) { 621 + DPRINTK("pixclock is zero\n"); 622 + return -EINVAL; 623 + } 624 + 620 625 if (PICOS2KHZ(var->pixclock) > PM2_MAX_PIXCLOCK) { 621 626 DPRINTK("pixclock too high (%ldKHz)\n", 622 627 PICOS2KHZ(var->pixclock));
+1 -1
drivers/video/fbdev/pxa168fb.c
··· 640 640 info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK | 641 641 FBINFO_HWACCEL_XPAN | FBINFO_HWACCEL_YPAN; 642 642 info->node = -1; 643 - strlcpy(info->fix.id, mi->id, 16); 643 + strscpy(info->fix.id, mi->id, 16); 644 644 info->fix.type = FB_TYPE_PACKED_PIXELS; 645 645 info->fix.type_aux = 0; 646 646 info->fix.xpanstep = 0;
+1 -1
drivers/video/fbdev/pxafb.c
··· 2042 2042 return -ENODEV; 2043 2043 2044 2044 if (options) 2045 - strlcpy(g_options, options, sizeof(g_options)); 2045 + strscpy(g_options, options, sizeof(g_options)); 2046 2046 2047 2047 return 0; 2048 2048 }
+1 -1
drivers/video/fbdev/s3fb.c
··· 248 248 { 249 249 struct s3fb_info *par = info->par; 250 250 251 - strlcpy(par->ddc_adapter.name, info->fix.id, 251 + strscpy(par->ddc_adapter.name, info->fix.id, 252 252 sizeof(par->ddc_adapter.name)); 253 253 par->ddc_adapter.owner = THIS_MODULE; 254 254 par->ddc_adapter.class = I2C_CLASS_DDC;
+1 -1
drivers/video/fbdev/simplefb.c
··· 355 355 if (!p || p == prop->name) 356 356 continue; 357 357 358 - strlcpy(name, prop->name, 358 + strscpy(name, prop->name, 359 359 strlen(prop->name) - strlen(SUPPLY_SUFFIX) + 1); 360 360 regulator = devm_regulator_get_optional(&pdev->dev, name); 361 361 if (IS_ERR(regulator)) {
+146 -138
drivers/video/fbdev/sis/sis_main.c
··· 649 649 u16 xres=0, yres, myres; 650 650 651 651 #ifdef CONFIG_FB_SIS_300 652 - if(ivideo->sisvga_engine == SIS_300_VGA) { 653 - if(!(sisbios_mode[myindex].chipset & MD_SIS300)) 652 + if (ivideo->sisvga_engine == SIS_300_VGA) { 653 + if (!(sisbios_mode[myindex].chipset & MD_SIS300)) 654 654 return -1 ; 655 655 } 656 656 #endif 657 657 #ifdef CONFIG_FB_SIS_315 658 - if(ivideo->sisvga_engine == SIS_315_VGA) { 659 - if(!(sisbios_mode[myindex].chipset & MD_SIS315)) 658 + if (ivideo->sisvga_engine == SIS_315_VGA) { 659 + if (!(sisbios_mode[myindex].chipset & MD_SIS315)) 660 660 return -1; 661 661 } 662 662 #endif 663 663 664 664 myres = sisbios_mode[myindex].yres; 665 665 666 - switch(vbflags & VB_DISPTYPE_DISP2) { 666 + switch (vbflags & VB_DISPTYPE_DISP2) { 667 667 668 668 case CRT2_LCD: 669 669 xres = ivideo->lcdxres; yres = ivideo->lcdyres; 670 670 671 - if((ivideo->SiS_Pr.SiS_CustomT != CUT_PANEL848) && 672 - (ivideo->SiS_Pr.SiS_CustomT != CUT_PANEL856)) { 673 - if(sisbios_mode[myindex].xres > xres) 671 + if ((ivideo->SiS_Pr.SiS_CustomT != CUT_PANEL848) && 672 + (ivideo->SiS_Pr.SiS_CustomT != CUT_PANEL856)) { 673 + if (sisbios_mode[myindex].xres > xres) 674 674 return -1; 675 - if(myres > yres) 675 + if (myres > yres) 676 676 return -1; 677 677 } 678 678 679 - if(ivideo->sisfb_fstn) { 680 - if(sisbios_mode[myindex].xres == 320) { 681 - if(myres == 240) { 682 - switch(sisbios_mode[myindex].mode_no[1]) { 679 + if (ivideo->sisfb_fstn) { 680 + if (sisbios_mode[myindex].xres == 320) { 681 + if (myres == 240) { 682 + switch (sisbios_mode[myindex].mode_no[1]) { 683 683 case 0x50: myindex = MODE_FSTN_8; break; 684 684 case 0x56: myindex = MODE_FSTN_16; break; 685 685 case 0x53: return -1; ··· 688 688 } 689 689 } 690 690 691 - if(SiS_GetModeID_LCD(ivideo->sisvga_engine, vbflags, sisbios_mode[myindex].xres, 691 + if (SiS_GetModeID_LCD(ivideo->sisvga_engine, vbflags, sisbios_mode[myindex].xres, 692 692 sisbios_mode[myindex].yres, 0, ivideo->sisfb_fstn, 693 693 ivideo->SiS_Pr.SiS_CustomT, xres, yres, ivideo->vbflags2) < 0x14) { 694 694 return -1; ··· 696 696 break; 697 697 698 698 case CRT2_TV: 699 - if(SiS_GetModeID_TV(ivideo->sisvga_engine, vbflags, sisbios_mode[myindex].xres, 699 + if (SiS_GetModeID_TV(ivideo->sisvga_engine, vbflags, sisbios_mode[myindex].xres, 700 700 sisbios_mode[myindex].yres, 0, ivideo->vbflags2) < 0x14) { 701 701 return -1; 702 702 } 703 703 break; 704 704 705 705 case CRT2_VGA: 706 - if(SiS_GetModeID_VGA2(ivideo->sisvga_engine, vbflags, sisbios_mode[myindex].xres, 706 + if (SiS_GetModeID_VGA2(ivideo->sisvga_engine, vbflags, sisbios_mode[myindex].xres, 707 707 sisbios_mode[myindex].yres, 0, ivideo->vbflags2) < 0x14) { 708 708 return -1; 709 709 } ··· 1872 1872 1873 1873 memset(fix, 0, sizeof(struct fb_fix_screeninfo)); 1874 1874 1875 - strlcpy(fix->id, ivideo->myid, sizeof(fix->id)); 1875 + strscpy(fix->id, ivideo->myid, sizeof(fix->id)); 1876 1876 1877 1877 mutex_lock(&info->mm_lock); 1878 1878 fix->smem_start = ivideo->video_base + ivideo->video_offset; ··· 2204 2204 2205 2205 static void sisfb_sense_crt1(struct sis_video_info *ivideo) 2206 2206 { 2207 - bool mustwait = false; 2208 - u8 sr1F, cr17; 2207 + bool mustwait = false; 2208 + u8 sr1F, cr17; 2209 2209 #ifdef CONFIG_FB_SIS_315 2210 - u8 cr63=0; 2210 + u8 cr63 = 0; 2211 2211 #endif 2212 - u16 temp = 0xffff; 2213 - int i; 2212 + u16 temp = 0xffff; 2213 + int i; 2214 2214 2215 - sr1F = SiS_GetReg(SISSR, 0x1F); 2216 - SiS_SetRegOR(SISSR, 0x1F, 0x04); 2217 - SiS_SetRegAND(SISSR, 0x1F, 0x3F); 2218 - if(sr1F & 0xc0) mustwait = true; 2215 + sr1F = SiS_GetReg(SISSR, 0x1F); 2216 + SiS_SetRegOR(SISSR, 0x1F, 0x04); 2217 + SiS_SetRegAND(SISSR, 0x1F, 0x3F); 2219 2218 2220 - #ifdef CONFIG_FB_SIS_315 2221 - if(ivideo->sisvga_engine == SIS_315_VGA) { 2222 - cr63 = SiS_GetReg(SISCR, ivideo->SiS_Pr.SiS_MyCR63); 2223 - cr63 &= 0x40; 2224 - SiS_SetRegAND(SISCR, ivideo->SiS_Pr.SiS_MyCR63, 0xBF); 2225 - } 2226 - #endif 2227 - 2228 - cr17 = SiS_GetReg(SISCR, 0x17); 2229 - cr17 &= 0x80; 2230 - if(!cr17) { 2231 - SiS_SetRegOR(SISCR, 0x17, 0x80); 2232 - mustwait = true; 2233 - SiS_SetReg(SISSR, 0x00, 0x01); 2234 - SiS_SetReg(SISSR, 0x00, 0x03); 2235 - } 2236 - 2237 - if(mustwait) { 2238 - for(i=0; i < 10; i++) sisfbwaitretracecrt1(ivideo); 2239 - } 2219 + if (sr1F & 0xc0) 2220 + mustwait = true; 2240 2221 2241 2222 #ifdef CONFIG_FB_SIS_315 2242 - if(ivideo->chip >= SIS_330) { 2243 - SiS_SetRegAND(SISCR, 0x32, ~0x20); 2244 - if(ivideo->chip >= SIS_340) { 2245 - SiS_SetReg(SISCR, 0x57, 0x4a); 2246 - } else { 2247 - SiS_SetReg(SISCR, 0x57, 0x5f); 2248 - } 2249 - SiS_SetRegOR(SISCR, 0x53, 0x02); 2250 - while ((SiS_GetRegByte(SISINPSTAT)) & 0x01) break; 2251 - while (!((SiS_GetRegByte(SISINPSTAT)) & 0x01)) break; 2252 - if ((SiS_GetRegByte(SISMISCW)) & 0x10) temp = 1; 2253 - SiS_SetRegAND(SISCR, 0x53, 0xfd); 2254 - SiS_SetRegAND(SISCR, 0x57, 0x00); 2255 - } 2223 + if (ivideo->sisvga_engine == SIS_315_VGA) { 2224 + cr63 = SiS_GetReg(SISCR, ivideo->SiS_Pr.SiS_MyCR63); 2225 + cr63 &= 0x40; 2226 + SiS_SetRegAND(SISCR, ivideo->SiS_Pr.SiS_MyCR63, 0xBF); 2227 + } 2256 2228 #endif 2257 2229 2258 - if(temp == 0xffff) { 2259 - i = 3; 2260 - do { 2261 - temp = SiS_HandleDDC(&ivideo->SiS_Pr, ivideo->vbflags, 2262 - ivideo->sisvga_engine, 0, 0, NULL, ivideo->vbflags2); 2263 - } while(((temp == 0) || (temp == 0xffff)) && i--); 2230 + cr17 = SiS_GetReg(SISCR, 0x17); 2231 + cr17 &= 0x80; 2264 2232 2265 - if((temp == 0) || (temp == 0xffff)) { 2266 - if(sisfb_test_DDC1(ivideo)) temp = 1; 2267 - } 2268 - } 2233 + if (!cr17) { 2234 + SiS_SetRegOR(SISCR, 0x17, 0x80); 2235 + mustwait = true; 2236 + SiS_SetReg(SISSR, 0x00, 0x01); 2237 + SiS_SetReg(SISSR, 0x00, 0x03); 2238 + } 2269 2239 2270 - if((temp) && (temp != 0xffff)) { 2271 - SiS_SetRegOR(SISCR, 0x32, 0x20); 2272 - } 2240 + if (mustwait) { 2241 + for (i = 0; i < 10; i++) 2242 + sisfbwaitretracecrt1(ivideo); 2243 + } 2244 + #ifdef CONFIG_FB_SIS_315 2245 + if (ivideo->chip >= SIS_330) { 2246 + SiS_SetRegAND(SISCR, 0x32, ~0x20); 2247 + if (ivideo->chip >= SIS_340) 2248 + SiS_SetReg(SISCR, 0x57, 0x4a); 2249 + else 2250 + SiS_SetReg(SISCR, 0x57, 0x5f); 2251 + 2252 + SiS_SetRegOR(SISCR, 0x53, 0x02); 2253 + while ((SiS_GetRegByte(SISINPSTAT)) & 0x01) 2254 + break; 2255 + while (!((SiS_GetRegByte(SISINPSTAT)) & 0x01)) 2256 + break; 2257 + if ((SiS_GetRegByte(SISMISCW)) & 0x10) 2258 + temp = 1; 2259 + 2260 + SiS_SetRegAND(SISCR, 0x53, 0xfd); 2261 + SiS_SetRegAND(SISCR, 0x57, 0x00); 2262 + } 2263 + #endif 2264 + 2265 + if (temp == 0xffff) { 2266 + i = 3; 2267 + 2268 + do { 2269 + temp = SiS_HandleDDC(&ivideo->SiS_Pr, ivideo->vbflags, 2270 + ivideo->sisvga_engine, 0, 0, NULL, ivideo->vbflags2); 2271 + } while (((temp == 0) || (temp == 0xffff)) && i--); 2272 + 2273 + if ((temp == 0) || (temp == 0xffff)) { 2274 + if (sisfb_test_DDC1(ivideo)) 2275 + temp = 1; 2276 + } 2277 + } 2278 + 2279 + if ((temp) && (temp != 0xffff)) 2280 + SiS_SetRegOR(SISCR, 0x32, 0x20); 2273 2281 2274 2282 #ifdef CONFIG_FB_SIS_315 2275 - if(ivideo->sisvga_engine == SIS_315_VGA) { 2276 - SiS_SetRegANDOR(SISCR, ivideo->SiS_Pr.SiS_MyCR63, 0xBF, cr63); 2277 - } 2283 + if (ivideo->sisvga_engine == SIS_315_VGA) 2284 + SiS_SetRegANDOR(SISCR, ivideo->SiS_Pr.SiS_MyCR63, 0xBF, cr63); 2278 2285 #endif 2279 2286 2280 - SiS_SetRegANDOR(SISCR, 0x17, 0x7F, cr17); 2281 - 2282 - SiS_SetReg(SISSR, 0x1F, sr1F); 2287 + SiS_SetRegANDOR(SISCR, 0x17, 0x7F, cr17); 2288 + SiS_SetReg(SISSR, 0x1F, sr1F); 2283 2289 } 2284 2290 2285 2291 /* Determine and detect attached devices on SiS30x */ ··· 2299 2293 ivideo->SiS_Pr.PanelSelfDetected = false; 2300 2294 2301 2295 /* LCD detection only for TMDS bridges */ 2302 - if(!(ivideo->vbflags2 & VB2_SISTMDSBRIDGE)) 2296 + if (!(ivideo->vbflags2 & VB2_SISTMDSBRIDGE)) 2303 2297 return; 2304 - if(ivideo->vbflags2 & VB2_30xBDH) 2298 + if (ivideo->vbflags2 & VB2_30xBDH) 2305 2299 return; 2306 2300 2307 2301 /* If LCD already set up by BIOS, skip it */ 2308 2302 reg = SiS_GetReg(SISCR, 0x32); 2309 - if(reg & 0x08) 2303 + if (reg & 0x08) 2310 2304 return; 2311 2305 2312 2306 realcrtno = 1; 2313 - if(ivideo->SiS_Pr.DDCPortMixup) 2307 + if (ivideo->SiS_Pr.DDCPortMixup) 2314 2308 realcrtno = 0; 2315 2309 2316 2310 /* Check DDC capabilities */ 2317 2311 temp = SiS_HandleDDC(&ivideo->SiS_Pr, ivideo->vbflags, ivideo->sisvga_engine, 2318 2312 realcrtno, 0, &buffer[0], ivideo->vbflags2); 2319 2313 2320 - if((!temp) || (temp == 0xffff) || (!(temp & 0x02))) 2314 + if ((!temp) || (temp == 0xffff) || (!(temp & 0x02))) 2321 2315 return; 2322 2316 2323 2317 /* Read DDC data */ ··· 2326 2320 temp = SiS_HandleDDC(&ivideo->SiS_Pr, ivideo->vbflags, 2327 2321 ivideo->sisvga_engine, realcrtno, 1, 2328 2322 &buffer[0], ivideo->vbflags2); 2329 - } while((temp) && i--); 2323 + } while ((temp) && i--); 2330 2324 2331 - if(temp) 2325 + if (temp) 2332 2326 return; 2333 2327 2334 2328 /* No digital device */ 2335 - if(!(buffer[0x14] & 0x80)) 2329 + if (!(buffer[0x14] & 0x80)) 2336 2330 return; 2337 2331 2338 2332 /* First detailed timing preferred timing? */ 2339 - if(!(buffer[0x18] & 0x02)) 2333 + if (!(buffer[0x18] & 0x02)) 2340 2334 return; 2341 2335 2342 2336 xres = buffer[0x38] | ((buffer[0x3a] & 0xf0) << 4); ··· 2344 2338 2345 2339 switch(xres) { 2346 2340 case 1024: 2347 - if(yres == 768) 2341 + if (yres == 768) 2348 2342 paneltype = 0x02; 2349 2343 break; 2350 2344 case 1280: 2351 - if(yres == 1024) 2345 + if (yres == 1024) 2352 2346 paneltype = 0x03; 2353 2347 break; 2354 2348 case 1600: 2355 - if((yres == 1200) && (ivideo->vbflags2 & VB2_30xC)) 2349 + if ((yres == 1200) && (ivideo->vbflags2 & VB2_30xC)) 2356 2350 paneltype = 0x0b; 2357 2351 break; 2358 2352 } 2359 2353 2360 - if(!paneltype) 2354 + if (!paneltype) 2361 2355 return; 2362 2356 2363 - if(buffer[0x23]) 2357 + if (buffer[0x23]) 2364 2358 cr37 |= 0x10; 2365 2359 2366 - if((buffer[0x47] & 0x18) == 0x18) 2360 + if ((buffer[0x47] & 0x18) == 0x18) 2367 2361 cr37 |= ((((buffer[0x47] & 0x06) ^ 0x06) << 5) | 0x20); 2368 2362 else 2369 2363 cr37 |= 0xc0; ··· 2378 2372 2379 2373 static int SISDoSense(struct sis_video_info *ivideo, u16 type, u16 test) 2380 2374 { 2381 - int temp, mytest, result, i, j; 2375 + int temp, mytest, result, i, j; 2382 2376 2383 - for(j = 0; j < 10; j++) { 2384 - result = 0; 2385 - for(i = 0; i < 3; i++) { 2386 - mytest = test; 2387 - SiS_SetReg(SISPART4, 0x11, (type & 0x00ff)); 2388 - temp = (type >> 8) | (mytest & 0x00ff); 2389 - SiS_SetRegANDOR(SISPART4, 0x10, 0xe0, temp); 2390 - SiS_DDC2Delay(&ivideo->SiS_Pr, 0x1500); 2391 - mytest >>= 8; 2392 - mytest &= 0x7f; 2393 - temp = SiS_GetReg(SISPART4, 0x03); 2394 - temp ^= 0x0e; 2395 - temp &= mytest; 2396 - if(temp == mytest) result++; 2377 + for (j = 0; j < 10; j++) { 2378 + result = 0; 2379 + for (i = 0; i < 3; i++) { 2380 + mytest = test; 2381 + SiS_SetReg(SISPART4, 0x11, (type & 0x00ff)); 2382 + temp = (type >> 8) | (mytest & 0x00ff); 2383 + SiS_SetRegANDOR(SISPART4, 0x10, 0xe0, temp); 2384 + SiS_DDC2Delay(&ivideo->SiS_Pr, 0x1500); 2385 + mytest >>= 8; 2386 + mytest &= 0x7f; 2387 + temp = SiS_GetReg(SISPART4, 0x03); 2388 + temp ^= 0x0e; 2389 + temp &= mytest; 2390 + if (temp == mytest) 2391 + result++; 2397 2392 #if 1 2398 - SiS_SetReg(SISPART4, 0x11, 0x00); 2399 - SiS_SetRegAND(SISPART4, 0x10, 0xe0); 2400 - SiS_DDC2Delay(&ivideo->SiS_Pr, 0x1000); 2393 + SiS_SetReg(SISPART4, 0x11, 0x00); 2394 + SiS_SetRegAND(SISPART4, 0x10, 0xe0); 2395 + SiS_DDC2Delay(&ivideo->SiS_Pr, 0x1000); 2401 2396 #endif 2402 - } 2403 - if((result == 0) || (result >= 2)) break; 2404 - } 2405 - return result; 2397 + } 2398 + 2399 + if ((result == 0) || (result >= 2)) 2400 + break; 2401 + } 2402 + return result; 2406 2403 } 2407 2404 2408 2405 static void SiS_Sense30x(struct sis_video_info *ivideo) ··· 4271 4262 unsigned int k, RankCapacity, PageCapacity, BankNumHigh, BankNumMid; 4272 4263 unsigned int PhysicalAdrOtherPage, PhysicalAdrHigh, PhysicalAdrHalfPage; 4273 4264 4274 - for(k = 0; k < ARRAY_SIZE(SiS_DRAMType); k++) { 4275 - 4265 + for (k = 0; k < ARRAY_SIZE(SiS_DRAMType); k++) { 4276 4266 RankCapacity = buswidth * SiS_DRAMType[k][3]; 4277 4267 4278 - if(RankCapacity != PseudoRankCapacity) 4268 + if (RankCapacity != PseudoRankCapacity) 4279 4269 continue; 4280 4270 4281 - if((SiS_DRAMType[k][2] + SiS_DRAMType[k][0]) > PseudoAdrPinCount) 4271 + if ((SiS_DRAMType[k][2] + SiS_DRAMType[k][0]) > PseudoAdrPinCount) 4282 4272 continue; 4283 4273 4284 4274 BankNumHigh = RankCapacity * 16 * iteration - 1; 4285 - if(iteration == 3) { /* Rank No */ 4275 + if (iteration == 3) { /* Rank No */ 4286 4276 BankNumMid = RankCapacity * 16 - 1; 4287 4277 } else { 4288 4278 BankNumMid = RankCapacity * 16 * iteration / 2 - 1; ··· 4295 4287 SiS_SetRegAND(SISSR, 0x15, 0xFB); /* Test */ 4296 4288 SiS_SetRegOR(SISSR, 0x15, 0x04); /* Test */ 4297 4289 sr14 = (SiS_DRAMType[k][3] * buswidth) - 1; 4298 - if(buswidth == 4) sr14 |= 0x80; 4299 - else if(buswidth == 2) sr14 |= 0x40; 4290 + 4291 + if (buswidth == 4) 4292 + sr14 |= 0x80; 4293 + else if (buswidth == 2) 4294 + sr14 |= 0x40; 4295 + 4300 4296 SiS_SetReg(SISSR, 0x13, SiS_DRAMType[k][4]); 4301 4297 SiS_SetReg(SISSR, 0x14, sr14); 4302 4298 4303 4299 BankNumHigh <<= 16; 4304 4300 BankNumMid <<= 16; 4305 4301 4306 - if((BankNumHigh + PhysicalAdrHigh >= mapsize) || 4307 - (BankNumMid + PhysicalAdrHigh >= mapsize) || 4308 - (BankNumHigh + PhysicalAdrHalfPage >= mapsize) || 4309 - (BankNumHigh + PhysicalAdrOtherPage >= mapsize)) 4302 + if ((BankNumHigh + PhysicalAdrHigh >= mapsize) || 4303 + (BankNumMid + PhysicalAdrHigh >= mapsize) || 4304 + (BankNumHigh + PhysicalAdrHalfPage >= mapsize) || 4305 + (BankNumHigh + PhysicalAdrOtherPage >= mapsize)) 4310 4306 continue; 4311 4307 4312 4308 /* Write data */ ··· 4324 4312 (FBAddr + BankNumHigh + PhysicalAdrOtherPage)); 4325 4313 4326 4314 /* Read data */ 4327 - if(readw(FBAddr + BankNumHigh + PhysicalAdrHigh) == PhysicalAdrHigh) 4315 + if (readw(FBAddr + BankNumHigh + PhysicalAdrHigh) == PhysicalAdrHigh) 4328 4316 return 1; 4329 4317 } 4330 4318 ··· 5879 5867 ivideo->cardnumber++; 5880 5868 } 5881 5869 5882 - strlcpy(ivideo->myid, chipinfo->chip_name, sizeof(ivideo->myid)); 5870 + strscpy(ivideo->myid, chipinfo->chip_name, sizeof(ivideo->myid)); 5883 5871 5884 5872 ivideo->warncount = 0; 5885 5873 ivideo->chip_id = pdev->device; ··· 6162 6150 #endif 6163 6151 6164 6152 #ifdef CONFIG_FB_SIS_315 6165 - if(ivideo->sisvga_engine == SIS_315_VGA) { 6153 + if (ivideo->sisvga_engine == SIS_315_VGA) { 6166 6154 int result = 1; 6167 - /* if((ivideo->chip == SIS_315H) || 6168 - (ivideo->chip == SIS_315) || 6169 - (ivideo->chip == SIS_315PRO) || 6170 - (ivideo->chip == SIS_330)) { 6171 - sisfb_post_sis315330(pdev); 6172 - } else */ if(ivideo->chip == XGI_20) { 6155 + 6156 + if (ivideo->chip == XGI_20) { 6173 6157 result = sisfb_post_xgi(pdev); 6174 6158 ivideo->sisfb_can_post = 1; 6175 - } else if((ivideo->chip == XGI_40) && ivideo->haveXGIROM) { 6159 + } else if ((ivideo->chip == XGI_40) && ivideo->haveXGIROM) { 6176 6160 result = sisfb_post_xgi(pdev); 6177 6161 ivideo->sisfb_can_post = 1; 6178 6162 } else { 6179 6163 printk(KERN_INFO "sisfb: Card is not " 6180 6164 "POSTed and sisfb can't do this either.\n"); 6181 6165 } 6182 - if(!result) { 6166 + if (!result) { 6183 6167 printk(KERN_ERR "sisfb: Failed to POST card\n"); 6184 6168 ret = -ENODEV; 6185 6169 goto error_3;
+1 -1
drivers/video/fbdev/sm501fb.c
··· 1719 1719 enable = 0; 1720 1720 } 1721 1721 1722 - strlcpy(fb->fix.id, fbname, sizeof(fb->fix.id)); 1722 + strscpy(fb->fix.id, fbname, sizeof(fb->fix.id)); 1723 1723 1724 1724 memcpy(&par->ops, 1725 1725 (head == HEAD_CRT) ? &sm501fb_ops_crt : &sm501fb_ops_pnl,
+1 -1
drivers/video/fbdev/ssd1307fb.c
··· 450 450 if (ret < 0) 451 451 return ret; 452 452 453 - /* Set Set Area Color Mode ON/OFF & Low Power Display Mode */ 453 + /* Set Area Color Mode ON/OFF & Low Power Display Mode */ 454 454 if (par->area_color_enable || par->low_power) { 455 455 u32 mode; 456 456
+1 -1
drivers/video/fbdev/sstfb.c
··· 1382 1382 goto fail; 1383 1383 } 1384 1384 sst_get_memsize(info, &fix->smem_len); 1385 - strlcpy(fix->id, spec->name, sizeof(fix->id)); 1385 + strscpy(fix->id, spec->name, sizeof(fix->id)); 1386 1386 1387 1387 printk(KERN_INFO "%s (revision %d) with %s dac\n", 1388 1388 fix->id, par->revision, par->dac_sw.name);
+1 -1
drivers/video/fbdev/sunxvr1000.c
··· 80 80 info->pseudo_palette = gp->pseudo_palette; 81 81 82 82 /* Fill fix common fields */ 83 - strlcpy(info->fix.id, "gfb", sizeof(info->fix.id)); 83 + strscpy(info->fix.id, "gfb", sizeof(info->fix.id)); 84 84 info->fix.smem_start = gp->fb_base_phys; 85 85 info->fix.smem_len = gp->fb_size; 86 86 info->fix.type = FB_TYPE_PACKED_PIXELS;
+1 -1
drivers/video/fbdev/sunxvr2500.c
··· 84 84 info->pseudo_palette = sp->pseudo_palette; 85 85 86 86 /* Fill fix common fields */ 87 - strlcpy(info->fix.id, "s3d", sizeof(info->fix.id)); 87 + strscpy(info->fix.id, "s3d", sizeof(info->fix.id)); 88 88 info->fix.smem_start = sp->fb_base_phys; 89 89 info->fix.smem_len = sp->fb_size; 90 90 info->fix.type = FB_TYPE_PACKED_PIXELS;
+1 -1
drivers/video/fbdev/sunxvr500.c
··· 207 207 info->pseudo_palette = ep->pseudo_palette; 208 208 209 209 /* Fill fix common fields */ 210 - strlcpy(info->fix.id, "e3d", sizeof(info->fix.id)); 210 + strscpy(info->fix.id, "e3d", sizeof(info->fix.id)); 211 211 info->fix.smem_start = ep->fb_base_phys; 212 212 info->fix.smem_len = ep->fb_size; 213 213 info->fix.type = FB_TYPE_PACKED_PIXELS;
+1 -1
drivers/video/fbdev/tcx.c
··· 333 333 else 334 334 tcx_name = "TCX24"; 335 335 336 - strlcpy(info->fix.id, tcx_name, sizeof(info->fix.id)); 336 + strscpy(info->fix.id, tcx_name, sizeof(info->fix.id)); 337 337 338 338 info->fix.type = FB_TYPE_PACKED_PIXELS; 339 339 info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
+2 -2
drivers/video/fbdev/tdfxfb.c
··· 1264 1264 { 1265 1265 int rc; 1266 1266 1267 - strlcpy(chan->adapter.name, name, sizeof(chan->adapter.name)); 1267 + strscpy(chan->adapter.name, name, sizeof(chan->adapter.name)); 1268 1268 chan->adapter.owner = THIS_MODULE; 1269 1269 chan->adapter.class = I2C_CLASS_DDC; 1270 1270 chan->adapter.algo_data = &chan->algo; ··· 1293 1293 { 1294 1294 int rc; 1295 1295 1296 - strlcpy(chan->adapter.name, name, sizeof(chan->adapter.name)); 1296 + strscpy(chan->adapter.name, name, sizeof(chan->adapter.name)); 1297 1297 chan->adapter.owner = THIS_MODULE; 1298 1298 chan->adapter.algo_data = &chan->algo; 1299 1299 chan->adapter.dev.parent = dev;
+1 -1
drivers/video/fbdev/tgafb.c
··· 1344 1344 memory_size = 16777216; 1345 1345 } 1346 1346 1347 - strlcpy(info->fix.id, tga_type_name, sizeof(info->fix.id)); 1347 + strscpy(info->fix.id, tga_type_name, sizeof(info->fix.id)); 1348 1348 1349 1349 info->fix.type = FB_TYPE_PACKED_PIXELS; 1350 1350 info->fix.type_aux = 0;
+1 -1
drivers/video/fbdev/tridentfb.c
··· 270 270 { 271 271 struct tridentfb_par *par = info->par; 272 272 273 - strlcpy(par->ddc_adapter.name, info->fix.id, 273 + strscpy(par->ddc_adapter.name, info->fix.id, 274 274 sizeof(par->ddc_adapter.name)); 275 275 par->ddc_adapter.owner = THIS_MODULE; 276 276 par->ddc_adapter.class = I2C_CLASS_DDC;