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

fbdev: Convert to using %pOFn instead of device_node.name

In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Rob Herring and committed by
Bartlomiej Zolnierkiewicz
5c63e407 60e5e48d

+16 -14
+1 -3
drivers/video/fbdev/cg14.c
··· 355 355 static void cg14_init_fix(struct fb_info *info, int linebytes, 356 356 struct device_node *dp) 357 357 { 358 - const char *name = dp->name; 359 - 360 - strlcpy(info->fix.id, name, sizeof(info->fix.id)); 358 + snprintf(info->fix.id, sizeof(info->fix.id), "%pOFn", dp); 361 359 362 360 info->fix.type = FB_TYPE_PACKED_PIXELS; 363 361 info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
+1 -1
drivers/video/fbdev/cg3.c
··· 246 246 static void cg3_init_fix(struct fb_info *info, int linebytes, 247 247 struct device_node *dp) 248 248 { 249 - strlcpy(info->fix.id, dp->name, sizeof(info->fix.id)); 249 + snprintf(info->fix.id, sizeof(info->fix.id), "%pOFn", dp); 250 250 251 251 info->fix.type = FB_TYPE_PACKED_PIXELS; 252 252 info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
+2 -2
drivers/video/fbdev/core/fbmon.c
··· 1480 1480 if (ret) 1481 1481 return ret; 1482 1482 1483 - pr_debug("%pOF: got %dx%d display mode from %s\n", 1484 - np, vm.hactive, vm.vactive, np->name); 1483 + pr_debug("%pOF: got %dx%d display mode\n", 1484 + np, vm.hactive, vm.vactive); 1485 1485 dump_fb_videomode(fb); 1486 1486 1487 1487 return 0;
+1 -1
drivers/video/fbdev/imsttfb.c
··· 1473 1473 1474 1474 dp = pci_device_to_OF_node(pdev); 1475 1475 if(dp) 1476 - printk(KERN_INFO "%s: OF name %s\n",__func__, dp->name); 1476 + printk(KERN_INFO "%s: OF name %pOFn\n",__func__, dp); 1477 1477 else if (IS_ENABLED(CONFIG_OF)) 1478 1478 printk(KERN_ERR "imsttfb: no OF node for pci device\n"); 1479 1479
+1 -1
drivers/video/fbdev/leo.c
··· 434 434 static void 435 435 leo_init_fix(struct fb_info *info, struct device_node *dp) 436 436 { 437 - strlcpy(info->fix.id, dp->name, sizeof(info->fix.id)); 437 + snprintf(info->fix.id, sizeof(info->fix.id), "%pOFn", dp); 438 438 439 439 info->fix.type = FB_TYPE_PACKED_PIXELS; 440 440 info->fix.visual = FB_VISUAL_TRUECOLOR;
+8 -4
drivers/video/fbdev/offb.c
··· 419 419 var = &info->var; 420 420 info->par = par; 421 421 422 - strcpy(fix->id, "OFfb "); 423 - strncat(fix->id, name, sizeof(fix->id) - sizeof("OFfb ")); 424 - fix->id[sizeof(fix->id) - 1] = '\0'; 422 + if (name) { 423 + strcpy(fix->id, "OFfb "); 424 + strncat(fix->id, name, sizeof(fix->id) - sizeof("OFfb ")); 425 + fix->id[sizeof(fix->id) - 1] = '\0'; 426 + } else 427 + snprintf(fix->id, sizeof(fix->id), "OFfb %pOFn", dp); 428 + 425 429 426 430 var->xres = var->xres_virtual = width; 427 431 var->yres = var->yres_virtual = height; ··· 648 644 /* kludge for valkyrie */ 649 645 if (strcmp(dp->name, "valkyrie") == 0) 650 646 address += 0x1000; 651 - offb_init_fb(no_real_node ? "bootx" : dp->name, 647 + offb_init_fb(no_real_node ? "bootx" : NULL, 652 648 width, height, depth, pitch, address, 653 649 foreign_endian, no_real_node ? NULL : dp); 654 650 }
+1 -1
drivers/video/fbdev/p9100.c
··· 239 239 240 240 static void p9100_init_fix(struct fb_info *info, int linebytes, struct device_node *dp) 241 241 { 242 - strlcpy(info->fix.id, dp->name, sizeof(info->fix.id)); 242 + snprintf(info->fix.id, sizeof(info->fix.id), "%pOFn", dp); 243 243 244 244 info->fix.type = FB_TYPE_PACKED_PIXELS; 245 245 info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
+1 -1
drivers/video/of_display_timing.c
··· 170 170 goto entryfail; 171 171 } 172 172 173 - pr_debug("%pOF: using %s as default timing\n", np, entry->name); 173 + pr_debug("%pOF: using %pOFn as default timing\n", np, entry); 174 174 175 175 native_mode = entry; 176 176