mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] serial-imx: fix for non of usage
Date: Tue, 23 Sep 2014 00:13:34 +0200	[thread overview]
Message-ID: <1411424015-16466-1-git-send-email-eric@eukrea.com> (raw)

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

             reply	other threads:[~2014-09-22 22:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22 22:13 Eric Bénard [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411424015-16466-1-git-send-email-eric@eukrea.com \
    --to=eric@eukrea.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox