usb: gadget: slp: add an acm instance to default functions
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 6 Mar 2014 04:20:23 +0000 (13:20 +0900)
committerChanho Park <chanho61.park@samsung.com>
Thu, 7 Aug 2014 06:17:52 +0000 (15:17 +0900)
To enable acm function with default configuration, acm function
should be added default function list and instance number should
also be set as at least 1.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/usb/gadget/slp.c

index 004680a..f4b6d1f 100644 (file)
@@ -155,7 +155,7 @@ struct slp_multi_dev {
 };
 
 /* TODO: only enabled 'rndis' and 'sdb'. need to verify more functions */
-static const char * const default_funcs[] = {"rndis", "sdb", "mtp"};
+static const char * const default_funcs[] = {"rndis", "sdb", "mtp", "acm"};
 static unsigned slp_multi_nluns;
 static struct class *slp_multi_class;
 static struct slp_multi_dev *_slp_multi_dev;
@@ -263,6 +263,7 @@ acm_function_init(struct slp_multi_usb_function *f,
        if (!config)
                return -ENOMEM;
        f->config = config;
+       config->instances = 1;
 
        for (i = 0; i < MAX_ACM_INSTANCES; i++) {
                config->f_acm_inst[i] = usb_get_function_instance("acm");