Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c63e407 authored by Rob Herring's avatar Rob Herring Committed by Bartlomiej Zolnierkiewicz
Browse files

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: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent 60e5e48d
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -355,9 +355,7 @@ static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
static void cg14_init_fix(struct fb_info *info, int linebytes,
			  struct device_node *dp)
{
	const char *name = dp->name;

	strlcpy(info->fix.id, name, sizeof(info->fix.id));
	snprintf(info->fix.id, sizeof(info->fix.id), "%pOFn", dp);

	info->fix.type = FB_TYPE_PACKED_PIXELS;
	info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
+1 −1
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ static int cg3_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
static void cg3_init_fix(struct fb_info *info, int linebytes,
			 struct device_node *dp)
{
	strlcpy(info->fix.id, dp->name, sizeof(info->fix.id));
	snprintf(info->fix.id, sizeof(info->fix.id), "%pOFn", dp);

	info->fix.type = FB_TYPE_PACKED_PIXELS;
	info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
+2 −2
Original line number Diff line number Diff line
@@ -1480,8 +1480,8 @@ int of_get_fb_videomode(struct device_node *np, struct fb_videomode *fb,
	if (ret)
		return ret;

	pr_debug("%pOF: got %dx%d display mode from %s\n",
		np, vm.hactive, vm.vactive, np->name);
	pr_debug("%pOF: got %dx%d display mode\n",
		np, vm.hactive, vm.vactive);
	dump_fb_videomode(fb);

	return 0;
+1 −1
Original line number Diff line number Diff line
@@ -1473,7 +1473,7 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
	
	dp = pci_device_to_OF_node(pdev);
	if(dp)
		printk(KERN_INFO "%s: OF name %s\n",__func__, dp->name);
		printk(KERN_INFO "%s: OF name %pOFn\n",__func__, dp);
	else if (IS_ENABLED(CONFIG_OF))
		printk(KERN_ERR "imsttfb: no OF node for pci device\n");

+1 −1
Original line number Diff line number Diff line
@@ -434,7 +434,7 @@ static int leo_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
static void
leo_init_fix(struct fb_info *info, struct device_node *dp)
{
	strlcpy(info->fix.id, dp->name, sizeof(info->fix.id));
	snprintf(info->fix.id, sizeof(info->fix.id), "%pOFn", dp);

	info->fix.type = FB_TYPE_PACKED_PIXELS;
	info->fix.visual = FB_VISUAL_TRUECOLOR;
Loading