From 2776d53d7ac8c2833d5220e7d96a2256642f6e7a Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 8 Jul 2014 15:07:11 +0200 Subject: USB: gadget: Update to 3.15 This updates the USB Gadget stack to Linux-3.15. Signed-off-by: Sascha Hauer Conflicts: drivers/usb/core/Makefile --- commands/usbserial.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'commands/usbserial.c') diff --git a/commands/usbserial.c b/commands/usbserial.c index e4c2f18024..7e82112df0 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] ") + BAREBOX_CMD_OPTS("[-mpVPasd] ") BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP) BAREBOX_CMD_HELP(cmd_usbserial_help) BAREBOX_CMD_END -- cgit v1.2.3