mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jan Luebbe <jlu@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] console: fix console without CONFIG_PARAMETER
Date: Mon, 15 Apr 2013 18:17:30 +0200	[thread overview]
Message-ID: <1366042650-28468-1-git-send-email-jlu@pengutronix.de> (raw)

If CONFIG_PARAMETER is not set, dev_set_param() does not call the setter
function. Call it directly instead in this case.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
 common/console.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/common/console.c b/common/console.c
index beb37bd..e4b0275 100644
--- a/common/console.c
+++ b/common/console.c
@@ -156,7 +156,10 @@ int console_register(struct console_device *newcdev)
 
 	if (newcdev->setbrg) {
 		dev_add_param(dev, "baudrate", console_baudrate_set, NULL, 0);
-		dev_set_param(dev, "baudrate", __stringify(CONFIG_BAUDRATE));
+		if (IS_ENABLED(CONFIG_PARAMETER))
+			dev_set_param(dev, "baudrate", __stringify(CONFIG_BAUDRATE));
+		else
+			console_baudrate_set(dev, NULL, __stringify(CONFIG_BAUDRATE));
 	}
 
 	dev_add_param(dev, "active", console_std_set, NULL, 0);
@@ -173,8 +176,12 @@ int console_register(struct console_device *newcdev)
 
 	list_add_tail(&newcdev->list, &console_list);
 
-	if (activate)
-		dev_set_param(dev, "active", "ioe");
+	if (activate) {
+		if (IS_ENABLED(CONFIG_PARAMETER))
+			dev_set_param(dev, "active", "ioe");
+		else
+			console_std_set(dev, NULL, "ioe");
+	}
 
 	return 0;
 }
-- 
1.8.2.rc2


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

                 reply	other threads:[~2013-04-15 16:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1366042650-28468-1-git-send-email-jlu@pengutronix.de \
    --to=jlu@pengutronix.de \
    --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