Skip to contentSkip to conversation

common: console_console: put functions under correct ifdef

PATCH Applied Lucas Stach 2 participants 4 messages Jan 18, 2015 – Jan 19, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 common: console_console: put functions under correct ifdef

So they aren't build when no console support is selected.

Fixes:
In function console_get_by_dev': undefined reference to console_list'

---
 common/console_common.c | 70 ++++++++++++++++++++++++-------------------------
 1 file changed, 35 insertions(+), 35 deletions(-)
common/console_common.c +35 -35
index df1b085982ad..d88e678aadb5 100644
@@ -247,6 +247,41 @@ int vprintf(const char *fmt, va_list args)
 }
 EXPORT_SYMBOL(vprintf);
 
+struct console_device *console_get_by_dev(struct device_d *dev)
+{
+	struct console_device *cdev;
+
+	for_each_console(cdev) {
+		if (cdev->dev == dev)
+			return cdev;
+	}
+
+	return NULL;
+}
+EXPORT_SYMBOL(console_get_by_dev);
+
+/*
+ * @brief returns current used console device
+ *
+ * @return console device which is registered with CONSOLE_STDIN and
+ * CONSOLE_STDOUT
+ */
+struct console_device *console_get_first_active(void)
+{
+	struct console_device *cdev;
+	/*
+	 * Assumption to have BOTH CONSOLE_STDIN AND STDOUT in the
+	 * same output console
+	 */
+	for_each_console(cdev) {
+		if ((cdev->f_active & (CONSOLE_STDIN | CONSOLE_STDOUT)))
+			return cdev;
+	}
+
+	return NULL;
+}
+EXPORT_SYMBOL(console_get_first_active);
+
 #endif /* !CONFIG_CONSOLE_NONE */
 
 int fprintf(int file, const char *fmt, ...)
@@ -291,38 +326,3 @@ int fputc(int fd, char c)
 	return 0;
 }
 EXPORT_SYMBOL(fputc);
-
-struct console_device *console_get_by_dev(struct device_d *dev)
-{
-	struct console_device *cdev;
-
-	for_each_console(cdev) {
-		if (cdev->dev == dev)
-			return cdev;
-	}
-
-	return NULL;
-}
-EXPORT_SYMBOL(console_get_by_dev);
-
-/*
- * @brief returns current used console device
- *
- * @return console device which is registered with CONSOLE_STDIN and
- * CONSOLE_STDOUT
- */
-struct console_device *console_get_first_active(void)
-{
-	struct console_device *cdev;
-	/*
-	 * Assumption to have BOTH CONSOLE_STDIN AND STDOUT in the
-	 * same output console
-	 */
-	for_each_console(cdev) {
-		if ((cdev->f_active & (CONSOLE_STDIN | CONSOLE_STDOUT)))
-			return cdev;
-	}
-
-	return NULL;
-}
-EXPORT_SYMBOL(console_get_first_active);
Signature · 7 lines
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH 2/3 usb: musb-dsps: select OFDEVICE

Fixes:
In function dsps_probe': undefined reference to of_usb_get_dr_mode'

---
 drivers/usb/musb/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/musb/Kconfig +1 -0
index e0a1139bc0d0..b795f30275cf 100644
@@ -5,6 +5,7 @@ if USB_MUSB
 
 config USB_MUSB_DSPS
 	tristate
+	select OFDEVICE
 
 config USB_MUSB_AM335X
 	tristate "AM335x USB support"
Signature · 7 lines
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH 3/3 arm: board: virt2real: build lowlevel in proper target

In reply to Lucas Stach

Fixes build with PBL enabled.

---
 arch/arm/boards/virt2real/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boards/virt2real/Makefile +2 -1
index b2f44bba1b5b..01c7a259e9a5 100644
@@ -1 +1,2 @@
-obj-y += lowlevel.o board.o
+obj-y += board.o
+lwl-y += lowlevel.o
Signature · 7 lines
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#3 lore raw
In reply to Lucas Stach
Quoted 6 lines · Lucas Stach

So they aren't build when no console support is selected.

Fixes:
In function console_get_by_dev': undefined reference to console_list'

Applied all, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox