]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/video/of_display_timing.c
Merge branch '4.14-features' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
[mirror_ubuntu-bionic-kernel.git] / drivers / video / of_display_timing.c
index 32b0a75434333b4d8678d95be1fca0e8289e4eb3..8ce0a99bf17ccf0fcb549639ff530dbfd5e0471c 100644 (file)
@@ -31,8 +31,7 @@ static int parse_timing_property(const struct device_node *np, const char *name,
 
        prop = of_find_property(np, name, &length);
        if (!prop) {
-               pr_err("%s: could not find property %s\n",
-                       of_node_full_name(np), name);
+               pr_err("%pOF: could not find property %s\n", np, name);
                return -EINVAL;
        }
 
@@ -44,8 +43,7 @@ static int parse_timing_property(const struct device_node *np, const char *name,
        } else if (cells == 3) {
                ret = of_property_read_u32_array(np, name, &result->min, cells);
        } else {
-               pr_err("%s: illegal timing specification in %s\n",
-                       of_node_full_name(np), name);
+               pr_err("%pOF: illegal timing specification in %s\n", np, name);
                return -EINVAL;
        }
 
@@ -105,8 +103,7 @@ static int of_parse_display_timing(const struct device_node *np,
                dt->flags |= DISPLAY_FLAGS_DOUBLECLK;
 
        if (ret) {
-               pr_err("%s: error reading timing properties\n",
-                       of_node_full_name(np));
+               pr_err("%pOF: error reading timing properties\n", np);
                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);
        if (!timing_np) {
-               pr_err("%s: could not find node '%s'\n",
-                       of_node_full_name(np), name);
+               pr_err("%pOF: could not find node '%s'\n", np, name);
                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");
        if (!timings_np) {
-               pr_err("%s: could not find display-timings node\n",
-                       of_node_full_name(np));
+               pr_err("%pOF: could not find display-timings node\n", np);
                return NULL;
        }
 
        disp = kzalloc(sizeof(*disp), GFP_KERNEL);
        if (!disp) {
-               pr_err("%s: could not allocate struct disp'\n",
-                       of_node_full_name(np));
+               pr_err("%pOF: could not allocate struct disp'\n", np);
                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);
        /* if there is no child, it is useless to go on */
        if (!entry) {
-               pr_err("%s: no timing specifications given\n",
-                       of_node_full_name(np));
+               pr_err("%pOF: no timing specifications given\n", np);
                goto entryfail;
        }
 
-       pr_debug("%s: using %s as default timing\n",
-               of_node_full_name(np), entry->name);
+       pr_debug("%pOF: using %s as default timing\n", np, entry->name);
 
        native_mode = entry;
 
        disp->num_timings = of_get_child_count(timings_np);
        if (disp->num_timings == 0) {
                /* 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;
        }
 
        disp->timings = kzalloc(sizeof(struct display_timing *) *
                                disp->num_timings, GFP_KERNEL);
        if (!disp->timings) {
-               pr_err("%s: could not allocate timings array\n",
-                       of_node_full_name(np));
+               pr_err("%pOF: could not allocate timings array\n", np);
                goto entryfail;
        }
 
@@ -206,8 +197,8 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
 
                dt = kzalloc(sizeof(*dt), GFP_KERNEL);
                if (!dt) {
-                       pr_err("%s: could not allocate display_timing struct\n",
-                                       of_node_full_name(np));
+                       pr_err("%pOF: could not allocate display_timing struct\n",
+                               np);
                        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
                         * an error
                         */
-                       pr_err("%s: error in timing %d\n",
-                               of_node_full_name(np), disp->num_timings + 1);
+                       pr_err("%pOF: error in timing %d\n",
+                               np, disp->num_timings + 1);
                        kfree(dt);
                        goto timingfail;
                }
@@ -236,8 +227,8 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
         */
        of_node_put(native_mode);
 
-       pr_debug("%s: got %d timings. Using timing #%d as default\n",
-               of_node_full_name(np), disp->num_timings,
+       pr_debug("%pOF: got %d timings. Using timing #%d as default\n",
+               np, disp->num_timings,
                disp->native_mode + 1);
 
        return disp;