summaryrefslogtreecommitdiffstats
path: root/commands/usbserial.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-07-08 15:07:11 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-07-22 08:08:44 +0200
commit2776d53d7ac8c2833d5220e7d96a2256642f6e7a (patch)
tree784694f14193fcbb30ede9558f578c0b9b3d089d /commands/usbserial.c
parent5ec16bea1a5425f944e6b909edda538385b238ca (diff)
downloadbarebox-2776d53d7ac8c2833d5220e7d96a2256642f6e7a.tar.gz
USB: gadget: Update to 3.15
This updates the USB Gadget stack to Linux-3.15. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Conflicts: drivers/usb/core/Makefile
Diffstat (limited to 'commands/usbserial.c')
-rw-r--r--commands/usbserial.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/commands/usbserial.c b/commands/usbserial.c
index e4c2f18..7e82112 100644
--- a/commands/usbserial.c
+++ b/commands/usbserial.c
@@ -34,7 +34,7 @@ static int do_usbserial(int argc, char *argv[])
char *manufacturer = "barebox";
const char *productname = barebox_get_model();
u16 idVendor = 0, idProduct = 0;
- int mode = 0;
+ int acm = 1;
while ((opt = getopt(argc, argv, "m:p:V:P:asd")) > 0) {
switch (opt) {
@@ -51,15 +51,10 @@ static int do_usbserial(int argc, char *argv[])
idProduct = simple_strtoul(optarg, NULL, 0);
break;
case 'a':
- mode = 0;
+ acm = 1;
break;
-#ifdef HAVE_OBEX
- case 'o':
- mode = 1;
- break;
-#endif
case 's':
- mode = 2;
+ acm = 0;
break;
case 'd':
usb_serial_unregister();
@@ -71,7 +66,7 @@ static int do_usbserial(int argc, char *argv[])
pdata.productname = productname;
pdata.idVendor = idVendor;
pdata.idProduct = idProduct;
- pdata.mode = mode;
+ pdata.acm = acm;
return usb_serial_register(&pdata);
}
@@ -85,9 +80,6 @@ BAREBOX_CMD_HELP_OPT ("-p STR", "product string")
BAREBOX_CMD_HELP_OPT ("-V ID", "vendor id")
BAREBOX_CMD_HELP_OPT ("-P ID", "product id")
BAREBOX_CMD_HELP_OPT ("-a", "CDC ACM (default)")
-#ifdef HAVE_OBEX
-BAREBOX_CMD_HELP_OPT ("-o", "CDC OBEX")
-#endif
BAREBOX_CMD_HELP_OPT ("-s", "Generic Serial")
BAREBOX_CMD_HELP_OPT ("-d", "Disable the serial gadget")
BAREBOX_CMD_HELP_END
@@ -95,11 +87,7 @@ BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(usbserial)
.cmd = do_usbserial,
BAREBOX_CMD_DESC("serial gadget enable/disable")
- BAREBOX_CMD_OPTS("[-mpVPa"
-#ifdef HAVE_OBEX
- "o"
-#endif
- "sd] <description>")
+ BAREBOX_CMD_OPTS("[-mpVPasd] <description>")
BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
BAREBOX_CMD_HELP(cmd_usbserial_help)
BAREBOX_CMD_END