video: fbdev: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>zero-colors
parent
376b3ff54c
commit
6d7e653300
|
@ -333,8 +333,8 @@ static int bw2_probe(struct platform_device *op)
|
||||||
|
|
||||||
dev_set_drvdata(&op->dev, info);
|
dev_set_drvdata(&op->dev, info);
|
||||||
|
|
||||||
printk(KERN_INFO "%s: bwtwo at %lx:%lx\n",
|
printk(KERN_INFO "%pOF: bwtwo at %lx:%lx\n",
|
||||||
dp->full_name, par->which_io, info->fix.smem_start);
|
dp, par->which_io, info->fix.smem_start);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -553,8 +553,8 @@ static int cg14_probe(struct platform_device *op)
|
||||||
|
|
||||||
dev_set_drvdata(&op->dev, info);
|
dev_set_drvdata(&op->dev, info);
|
||||||
|
|
||||||
printk(KERN_INFO "%s: cgfourteen at %lx:%lx, %dMB\n",
|
printk(KERN_INFO "%pOF: cgfourteen at %lx:%lx, %dMB\n",
|
||||||
dp->full_name,
|
dp,
|
||||||
par->iospace, info->fix.smem_start,
|
par->iospace, info->fix.smem_start,
|
||||||
par->ramsize >> 20);
|
par->ramsize >> 20);
|
||||||
|
|
||||||
|
|
|
@ -412,8 +412,8 @@ static int cg3_probe(struct platform_device *op)
|
||||||
|
|
||||||
dev_set_drvdata(&op->dev, info);
|
dev_set_drvdata(&op->dev, info);
|
||||||
|
|
||||||
printk(KERN_INFO "%s: cg3 at %lx:%lx\n",
|
printk(KERN_INFO "%pOF: cg3 at %lx:%lx\n",
|
||||||
dp->full_name, par->which_io, info->fix.smem_start);
|
dp, par->which_io, info->fix.smem_start);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -810,8 +810,8 @@ static int cg6_probe(struct platform_device *op)
|
||||||
|
|
||||||
dev_set_drvdata(&op->dev, info);
|
dev_set_drvdata(&op->dev, info);
|
||||||
|
|
||||||
printk(KERN_INFO "%s: CGsix [%s] at %lx:%lx\n",
|
printk(KERN_INFO "%pOF: CGsix [%s] at %lx:%lx\n",
|
||||||
dp->full_name, info->fix.id,
|
dp, info->fix.id,
|
||||||
par->which_io, info->fix.smem_start);
|
par->which_io, info->fix.smem_start);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1479,8 +1479,8 @@ int of_get_fb_videomode(struct device_node *np, struct fb_videomode *fb,
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
pr_debug("%s: got %dx%d display mode from %s\n",
|
pr_debug("%pOF: got %dx%d display mode from %s\n",
|
||||||
of_node_full_name(np), vm.hactive, vm.vactive, np->name);
|
np, vm.hactive, vm.vactive, np->name);
|
||||||
dump_fb_videomode(fb);
|
dump_fb_videomode(fb);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -997,9 +997,9 @@ static int ffb_probe(struct platform_device *op)
|
||||||
|
|
||||||
dev_set_drvdata(&op->dev, info);
|
dev_set_drvdata(&op->dev, info);
|
||||||
|
|
||||||
printk(KERN_INFO "%s: %s at %016lx, type %d, "
|
printk(KERN_INFO "%pOF: %s at %016lx, type %d, "
|
||||||
"DAC pnum[%x] rev[%d] manuf_rev[%d]\n",
|
"DAC pnum[%x] rev[%d] manuf_rev[%d]\n",
|
||||||
dp->full_name,
|
dp,
|
||||||
((par->flags & FFB_FLAG_AFB) ? "AFB" : "FFB"),
|
((par->flags & FFB_FLAG_AFB) ? "AFB" : "FFB"),
|
||||||
par->physbase, par->board_type,
|
par->physbase, par->board_type,
|
||||||
dac_pnum, dac_rev, dac_mrev);
|
dac_pnum, dac_rev, dac_mrev);
|
||||||
|
|
|
@ -619,8 +619,8 @@ static int leo_probe(struct platform_device *op)
|
||||||
|
|
||||||
dev_set_drvdata(&op->dev, info);
|
dev_set_drvdata(&op->dev, info);
|
||||||
|
|
||||||
printk(KERN_INFO "%s: leo at %lx:%lx\n",
|
printk(KERN_INFO "%pOF: leo at %lx:%lx\n",
|
||||||
dp->full_name,
|
dp,
|
||||||
par->which_io, info->fix.smem_start);
|
par->which_io, info->fix.smem_start);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -383,7 +383,7 @@ static void offb_init_palette_hacks(struct fb_info *info, struct device_node *dp
|
||||||
FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_STATIC_PSEUDOCOLOR;
|
FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_STATIC_PSEUDOCOLOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init offb_init_fb(const char *name, const char *full_name,
|
static void __init offb_init_fb(const char *name,
|
||||||
int width, int height, int depth,
|
int width, int height, int depth,
|
||||||
int pitch, unsigned long address,
|
int pitch, unsigned long address,
|
||||||
int foreign_endian, struct device_node *dp)
|
int foreign_endian, struct device_node *dp)
|
||||||
|
@ -402,14 +402,13 @@ static void __init offb_init_fb(const char *name, const char *full_name,
|
||||||
"Using unsupported %dx%d %s at %lx, depth=%d, pitch=%d\n",
|
"Using unsupported %dx%d %s at %lx, depth=%d, pitch=%d\n",
|
||||||
width, height, name, address, depth, pitch);
|
width, height, name, address, depth, pitch);
|
||||||
if (depth != 8 && depth != 15 && depth != 16 && depth != 32) {
|
if (depth != 8 && depth != 15 && depth != 16 && depth != 32) {
|
||||||
printk(KERN_ERR "%s: can't use depth = %d\n", full_name,
|
printk(KERN_ERR "%pOF: can't use depth = %d\n", dp, depth);
|
||||||
depth);
|
|
||||||
release_mem_region(res_start, res_size);
|
release_mem_region(res_start, res_size);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
info = framebuffer_alloc(sizeof(u32) * 16, NULL);
|
info = framebuffer_alloc(sizeof(u32) * 16, NULL);
|
||||||
|
|
||||||
if (info == 0) {
|
if (info == 0) {
|
||||||
release_mem_region(res_start, res_size);
|
release_mem_region(res_start, res_size);
|
||||||
return;
|
return;
|
||||||
|
@ -515,7 +514,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
|
||||||
if (register_framebuffer(info) < 0)
|
if (register_framebuffer(info) < 0)
|
||||||
goto out_err;
|
goto out_err;
|
||||||
|
|
||||||
fb_info(info, "Open Firmware frame buffer device on %s\n", full_name);
|
fb_info(info, "Open Firmware frame buffer device on %pOF\n", dp);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
out_err:
|
out_err:
|
||||||
|
@ -644,7 +643,6 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)
|
||||||
if (strcmp(dp->name, "valkyrie") == 0)
|
if (strcmp(dp->name, "valkyrie") == 0)
|
||||||
address += 0x1000;
|
address += 0x1000;
|
||||||
offb_init_fb(no_real_node ? "bootx" : dp->name,
|
offb_init_fb(no_real_node ? "bootx" : dp->name,
|
||||||
no_real_node ? "display" : dp->full_name,
|
|
||||||
width, height, depth, pitch, address,
|
width, height, depth, pitch, address,
|
||||||
foreign_endian, no_real_node ? NULL : dp);
|
foreign_endian, no_real_node ? NULL : dp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -304,8 +304,8 @@ static int p9100_probe(struct platform_device *op)
|
||||||
|
|
||||||
dev_set_drvdata(&op->dev, info);
|
dev_set_drvdata(&op->dev, info);
|
||||||
|
|
||||||
printk(KERN_INFO "%s: p9100 at %lx:%lx\n",
|
printk(KERN_INFO "%pOF: p9100 at %lx:%lx\n",
|
||||||
dp->full_name,
|
dp,
|
||||||
par->which_io, info->fix.smem_start);
|
par->which_io, info->fix.smem_start);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -33,8 +33,8 @@ static int gfb_get_props(struct gfb_info *gp)
|
||||||
gp->depth = of_getintprop_default(gp->of_node, "depth", 32);
|
gp->depth = of_getintprop_default(gp->of_node, "depth", 32);
|
||||||
|
|
||||||
if (!gp->width || !gp->height) {
|
if (!gp->width || !gp->height) {
|
||||||
printk(KERN_ERR "gfb: Critical properties missing for %s\n",
|
printk(KERN_ERR "gfb: Critical properties missing for %pOF\n",
|
||||||
gp->of_node->full_name);
|
gp->of_node);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,12 +151,12 @@ static int gfb_probe(struct platform_device *op)
|
||||||
if (err)
|
if (err)
|
||||||
goto err_unmap_fb;
|
goto err_unmap_fb;
|
||||||
|
|
||||||
printk("gfb: Found device at %s\n", dp->full_name);
|
printk("gfb: Found device at %pOF\n", dp);
|
||||||
|
|
||||||
err = register_framebuffer(info);
|
err = register_framebuffer(info);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
printk(KERN_ERR "gfb: Could not register framebuffer %s\n",
|
printk(KERN_ERR "gfb: Could not register framebuffer %pOF\n",
|
||||||
dp->full_name);
|
dp);
|
||||||
goto err_unmap_fb;
|
goto err_unmap_fb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -467,8 +467,8 @@ static int tcx_probe(struct platform_device *op)
|
||||||
|
|
||||||
dev_set_drvdata(&op->dev, info);
|
dev_set_drvdata(&op->dev, info);
|
||||||
|
|
||||||
printk(KERN_INFO "%s: TCX at %lx:%lx, %s\n",
|
printk(KERN_INFO "%pOF: TCX at %lx:%lx, %s\n",
|
||||||
dp->full_name,
|
dp,
|
||||||
par->which_io,
|
par->which_io,
|
||||||
info->fix.smem_start,
|
info->fix.smem_start,
|
||||||
par->lowdepth ? "8-bit only" : "24-bit depth");
|
par->lowdepth ? "8-bit only" : "24-bit depth");
|
||||||
|
|
|
@ -31,8 +31,7 @@ static int parse_timing_property(const struct device_node *np, const char *name,
|
||||||
|
|
||||||
prop = of_find_property(np, name, &length);
|
prop = of_find_property(np, name, &length);
|
||||||
if (!prop) {
|
if (!prop) {
|
||||||
pr_err("%s: could not find property %s\n",
|
pr_err("%pOF: could not find property %s\n", np, name);
|
||||||
of_node_full_name(np), name);
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,8 +43,7 @@ static int parse_timing_property(const struct device_node *np, const char *name,
|
||||||
} else if (cells == 3) {
|
} else if (cells == 3) {
|
||||||
ret = of_property_read_u32_array(np, name, &result->min, cells);
|
ret = of_property_read_u32_array(np, name, &result->min, cells);
|
||||||
} else {
|
} else {
|
||||||
pr_err("%s: illegal timing specification in %s\n",
|
pr_err("%pOF: illegal timing specification in %s\n", np, name);
|
||||||
of_node_full_name(np), name);
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,8 +103,7 @@ static int of_parse_display_timing(const struct device_node *np,
|
||||||
dt->flags |= DISPLAY_FLAGS_DOUBLECLK;
|
dt->flags |= DISPLAY_FLAGS_DOUBLECLK;
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("%s: error reading timing properties\n",
|
pr_err("%pOF: error reading timing properties\n", np);
|
||||||
of_node_full_name(np));
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,8 +126,7 @@ int of_get_display_timing(const struct device_node *np, const char *name,
|
||||||
|
|
||||||
timing_np = of_get_child_by_name(np, name);
|
timing_np = of_get_child_by_name(np, name);
|
||||||
if (!timing_np) {
|
if (!timing_np) {
|
||||||
pr_err("%s: could not find node '%s'\n",
|
pr_err("%pOF: could not find node '%s'\n", np, name);
|
||||||
of_node_full_name(np), name);
|
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,15 +150,13 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
|
||||||
|
|
||||||
timings_np = of_get_child_by_name(np, "display-timings");
|
timings_np = of_get_child_by_name(np, "display-timings");
|
||||||
if (!timings_np) {
|
if (!timings_np) {
|
||||||
pr_err("%s: could not find display-timings node\n",
|
pr_err("%pOF: could not find display-timings node\n", np);
|
||||||
of_node_full_name(np));
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
disp = kzalloc(sizeof(*disp), GFP_KERNEL);
|
disp = kzalloc(sizeof(*disp), GFP_KERNEL);
|
||||||
if (!disp) {
|
if (!disp) {
|
||||||
pr_err("%s: could not allocate struct disp'\n",
|
pr_err("%pOF: could not allocate struct disp'\n", np);
|
||||||
of_node_full_name(np));
|
|
||||||
goto dispfail;
|
goto dispfail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,28 +166,25 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
|
||||||
entry = of_get_next_child(timings_np, NULL);
|
entry = of_get_next_child(timings_np, NULL);
|
||||||
/* if there is no child, it is useless to go on */
|
/* if there is no child, it is useless to go on */
|
||||||
if (!entry) {
|
if (!entry) {
|
||||||
pr_err("%s: no timing specifications given\n",
|
pr_err("%pOF: no timing specifications given\n", np);
|
||||||
of_node_full_name(np));
|
|
||||||
goto entryfail;
|
goto entryfail;
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_debug("%s: using %s as default timing\n",
|
pr_debug("%pOF: using %s as default timing\n", np, entry->name);
|
||||||
of_node_full_name(np), entry->name);
|
|
||||||
|
|
||||||
native_mode = entry;
|
native_mode = entry;
|
||||||
|
|
||||||
disp->num_timings = of_get_child_count(timings_np);
|
disp->num_timings = of_get_child_count(timings_np);
|
||||||
if (disp->num_timings == 0) {
|
if (disp->num_timings == 0) {
|
||||||
/* should never happen, as entry was already found above */
|
/* should never happen, as entry was already found above */
|
||||||
pr_err("%s: no timings specified\n", of_node_full_name(np));
|
pr_err("%pOF: no timings specified\n", np);
|
||||||
goto entryfail;
|
goto entryfail;
|
||||||
}
|
}
|
||||||
|
|
||||||
disp->timings = kzalloc(sizeof(struct display_timing *) *
|
disp->timings = kzalloc(sizeof(struct display_timing *) *
|
||||||
disp->num_timings, GFP_KERNEL);
|
disp->num_timings, GFP_KERNEL);
|
||||||
if (!disp->timings) {
|
if (!disp->timings) {
|
||||||
pr_err("%s: could not allocate timings array\n",
|
pr_err("%pOF: could not allocate timings array\n", np);
|
||||||
of_node_full_name(np));
|
|
||||||
goto entryfail;
|
goto entryfail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,8 +197,8 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
|
||||||
|
|
||||||
dt = kzalloc(sizeof(*dt), GFP_KERNEL);
|
dt = kzalloc(sizeof(*dt), GFP_KERNEL);
|
||||||
if (!dt) {
|
if (!dt) {
|
||||||
pr_err("%s: could not allocate display_timing struct\n",
|
pr_err("%pOF: could not allocate display_timing struct\n",
|
||||||
of_node_full_name(np));
|
np);
|
||||||
goto timingfail;
|
goto timingfail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,8 +208,8 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
|
||||||
* to not encourage wrong devicetrees, fail in case of
|
* to not encourage wrong devicetrees, fail in case of
|
||||||
* an error
|
* an error
|
||||||
*/
|
*/
|
||||||
pr_err("%s: error in timing %d\n",
|
pr_err("%pOF: error in timing %d\n",
|
||||||
of_node_full_name(np), disp->num_timings + 1);
|
np, disp->num_timings + 1);
|
||||||
kfree(dt);
|
kfree(dt);
|
||||||
goto timingfail;
|
goto timingfail;
|
||||||
}
|
}
|
||||||
|
@ -236,8 +227,8 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
|
||||||
*/
|
*/
|
||||||
of_node_put(native_mode);
|
of_node_put(native_mode);
|
||||||
|
|
||||||
pr_debug("%s: got %d timings. Using timing #%d as default\n",
|
pr_debug("%pOF: got %d timings. Using timing #%d as default\n",
|
||||||
of_node_full_name(np), disp->num_timings,
|
np, disp->num_timings,
|
||||||
disp->native_mode + 1);
|
disp->native_mode + 1);
|
||||||
|
|
||||||
return disp;
|
return disp;
|
||||||
|
|
|
@ -36,7 +36,7 @@ int of_get_videomode(struct device_node *np, struct videomode *vm,
|
||||||
|
|
||||||
disp = of_get_display_timings(np);
|
disp = of_get_display_timings(np);
|
||||||
if (!disp) {
|
if (!disp) {
|
||||||
pr_err("%s: no timings specified\n", of_node_full_name(np));
|
pr_err("%pOF: no timings specified\n", np);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue