mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] serial-imx: fix for non of usage
@ 2014-09-22 22:13 Eric Bénard
  2014-09-22 22:13 ` [PATCH 2/2] eukrea-cpuimx35: refresh configuration Eric Bénard
  2014-09-23  6:04 ` [PATCH 1/2] serial-imx: fix for non of usage Sascha Hauer
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Bénard @ 2014-09-22 22:13 UTC (permalink / raw)
  To: barebox

this was broken by :
"3843bfd serial: imx: Determine device name from device tree"

Tested on an i.MX35.

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 drivers/serial/serial_imx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/serial/serial_imx.c b/drivers/serial/serial_imx.c
index 474bfaf..e97fd2f 100644
--- a/drivers/serial/serial_imx.c
+++ b/drivers/serial/serial_imx.c
@@ -338,10 +338,11 @@ static int imx_serial_probe(struct device_d *dev)
 	cdev->flush = imx_serial_flush;
 	cdev->setbrg = imx_serial_setbaudrate;
 	cdev->linux_console_name = "ttymxc";
-	devname = of_alias_get(dev->device_node);
-	if (devname)
-		cdev->devname = xstrdup(devname);
-
+	if (dev->device_node) {
+		devname = of_alias_get(dev->device_node);
+		if (devname)
+			cdev->devname = xstrdup(devname);
+	}
 	imx_serial_init_port(cdev);
 
 	/* Enable UART */
@@ -352,7 +353,6 @@ static int imx_serial_probe(struct device_d *dev)
 	console_register(cdev);
 	priv->notify.notifier_call = imx_clocksource_clock_change;
 	clock_register_client(&priv->notify);
-
 	return 0;
 
 err_free:
-- 
1.9.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-23  6:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-22 22:13 [PATCH 1/2] serial-imx: fix for non of usage Eric Bénard
2014-09-22 22:13 ` [PATCH 2/2] eukrea-cpuimx35: refresh configuration Eric Bénard
2014-09-23  6:05   ` Sascha Hauer
2014-09-23  6:04 ` [PATCH 1/2] serial-imx: fix for non of usage Sascha Hauer
2014-09-23  6:15   ` Eric Bénard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox