BZ: 17930
We don't have enough endpoints to support multi-instances ACM.
Change-Id: I7378f336ed22751b8255c3c8617d2740ca397cf3
Signed-off-by: Wu, Hao <hao.wu@intel.com>
Reviewed-on: http://android.intel.com:8080/29632
Reviewed-by: Zhuang, Jin Can <jin.can.zhuang@intel.com>
Reviewed-by: Tang, Richard <richard.tang@intel.com>
Reviewed-by: Meng, Zhe <zhe.meng@intel.com>
Tested-by: Meng, Zhe <zhe.meng@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
};
-#define MAX_ACM_INSTANCES 4
+#define MAX_ACM_INSTANCES 1
struct acm_function_config {
int instances;
};
static int acm_function_init(struct android_usb_function *f, struct usb_composite_dev *cdev)
{
+ struct acm_function_config *config;
+
f->config = kzalloc(sizeof(struct acm_function_config), GFP_KERNEL);
if (!f->config)
return -ENOMEM;
+ config = f->config;
+ config->instances = MAX_ACM_INSTANCES;
+
return gserial_setup(cdev->gadget, MAX_ACM_INSTANCES);
}