]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
serial: imx: Use NULL as the last argument of add_preferred_console()
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 2 Sep 2013 01:24:35 +0000 (22:24 -0300)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 16 Jun 2014 16:00:04 +0000 (18:00 +0200)
Commit f7d2c0bbd (serial: i.MX: evaluate linux,stdout-path property) introduced
the following sparse warning:

drivers/tty/serial/imx.c:1916:77: warning: Using plain integer as NULL pointer

Pass NULL as the last argument of add_preferred_console() instead of zero.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Huang Shijie <b32955@freescale.com>
drivers/tty/serial/imx.c

index cc7161c43650616c9673bde3c301009f96cf7d9a..6698185407356abed64d7407b82c93331301c2fb 100644 (file)
@@ -1866,7 +1866,8 @@ static int serial_imx_probe_dt(struct imx_port *sport,
        sport->devdata = of_id->data;
 
        if (of_device_is_stdout_path(np))
-               add_preferred_console(imx_reg.cons->name, sport->port.line, 0);
+               add_preferred_console(imx_reg.cons->name, sport->port.line,
+                                     NULL);
 
        return 0;
 }