Merge tag 'devicetree-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-rpi.git] / drivers / of / base.c
index 3de07e6..f2e649f 100644 (file)
@@ -1648,8 +1648,12 @@ bool of_console_check(struct device_node *dn, char *name, int index)
 {
        if (!dn || dn != of_stdout || console_set_on_cmdline)
                return false;
-       return !add_preferred_console(name, index,
-                                     kstrdup(of_stdout_options, GFP_KERNEL));
+
+       /*
+        * XXX: cast `options' to char pointer to suppress complication
+        * warnings: printk, UART and console drivers expect char pointer.
+        */
+       return !add_preferred_console(name, index, (char *)of_stdout_options);
 }
 EXPORT_SYMBOL_GPL(of_console_check);