[PATCH 4/4] usb: usbserial gadget: Add persistent device name

Sascha Hauer s.hauer at pengutronix.de
Fri Jul 11 01:02:13 PDT 2014


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/usb/gadget/u_serial.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index c2072dc..375ec65 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -483,7 +483,12 @@ int gserial_connect(struct gserial *gser, u8 port_num)
 	cdev->getc = serial_getc;
 	cdev->flush = serial_flush;
 	cdev->setbrg = serial_setbaudrate;
-	console_register(cdev);
+	cdev->devname = "usbserial";
+
+	status = console_register(cdev);
+	if (status)
+		goto fail_out;
+
 	mycdev = cdev;
 
 	return status;
-- 
2.0.0




More information about the barebox mailing list