[PATCH 1/4] usb: gadget: serial: only call into CONSOLE_FULL code if it's there

Lucas Stach l.stach at pengutronix.de
Thu Jul 23 02:56:50 PDT 2015


From: Lucas Stach <dev at lynxeye.de>

Fixes:
drivers/built-in.o: In function `gserial_connect':
drivers/usb/gadget/u_serial.c:539: undefined reference to `console_set_active'

Signed-off-by: Lucas Stach <dev at lynxeye.de>
---
 drivers/usb/gadget/u_serial.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index 2b0faf33037e..140346e77028 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -536,8 +536,9 @@ int gserial_connect(struct gserial *gser, u8 port_num)
 	if (status)
 		goto fail_out;
 
-	console_set_active(cdev, CONSOLE_STDIN | CONSOLE_STDOUT |
-		CONSOLE_STDERR);
+	if (IS_ENABLED(CONFIG_CONSOLE_FULL))
+		console_set_active(cdev, CONSOLE_STDIN | CONSOLE_STDOUT |
+				   CONSOLE_STDERR);
 
 	/* REVISIT if waiting on "carrier detect", signal. */
 
-- 
2.1.4




More information about the barebox mailing list