* [PATCH 2/2] console: fix console without CONFIG_PARAMETER
@ 2013-04-15 16:17 Jan Luebbe
0 siblings, 0 replies; only message in thread
From: Jan Luebbe @ 2013-04-15 16:17 UTC (permalink / raw)
To: barebox
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-04-15 16:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-15 16:17 [PATCH 2/2] console: fix console without CONFIG_PARAMETER Jan Luebbe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox