u16 w_value = le16_to_cpu(ctrl->wValue);
u16 w_length = le16_to_cpu(ctrl->wLength);
+#ifdef CONFIG_USB_F_ACM_DUMMY
+ return 0;
+#endif
+
/* composite driver infrastructure handles everything except
* CDC class messages; interface activation uses set_alt().
*
struct f_acm *acm = func_to_acm(f);
struct usb_composite_dev *cdev = f->config->cdev;
+#ifdef CONFIG_USB_F_ACM_DUMMY
+ return 0;
+#endif
/* we know alt == 0, so this is an activation or a reset */
if (intf == acm->ctrl_id) {
struct f_acm *acm = func_to_acm(f);
struct usb_composite_dev *cdev = f->config->cdev;
+#ifdef CONFIG_USB_F_ACM_DUMMY
+ return;
+#endif
+
dev_dbg(&cdev->gadget->dev, "acm ttyGS%d deactivated\n", acm->port_num);
gserial_disconnect(&acm->port);
usb_ep_disable(acm->notify);
{
struct f_acm *acm = port_to_acm(port);
+#ifdef CONFIG_USB_F_ACM_DUMMY
+ return;
+#endif
+
acm->serial_state |= ACM_CTRL_DSR | ACM_CTRL_DCD;
acm_notify_serial_state(acm);
}
{
struct f_acm *acm = port_to_acm(port);
+#ifdef CONFIG_USB_F_ACM_DUMMY
+ return;
+#endif
acm->serial_state &= ~(ACM_CTRL_DSR | ACM_CTRL_DCD);
acm_notify_serial_state(acm);
}
struct f_acm *acm = port_to_acm(port);
u16 state;
+#ifdef CONFIG_USB_F_ACM_DUMMY
+ return 0;
+#endif
state = acm->serial_state;
state &= ~ACM_CTRL_BRK;
if (duration)
int status;
struct usb_ep *ep;
+#ifdef CONFIG_USB_F_ACM_DUMMY
+ return 0;
+#endif
/* REVISIT might want instance-specific strings to help
* distinguish instances ...
*/
{
struct f_acm *acm = func_to_acm(f);
+#ifdef CONFIG_USB_F_ACM_DUMMY
+ return;
+#endif
+
acm_string_defs[0].id = 0;
usb_free_all_descriptors(f);
if (acm->notify_req)
NULL,
};
-static struct config_item_type acm_func_type = {
+static __maybe_unused struct config_item_type acm_func_type = {
.ct_item_ops = &acm_item_ops,
.ct_attrs = acm_attrs,
.ct_owner = THIS_MODULE,
struct f_serial_opts *opts;
opts = container_of(fi, struct f_serial_opts, func_inst);
+#ifndef CONFIG_USB_F_ACM_DUMMY
gserial_free_line(opts->port_num);
+#endif
kfree(opts);
}
static struct usb_function_instance *acm_alloc_instance(void)
{
struct f_serial_opts *opts;
- int ret;
+ __maybe_unused int ret;
opts = kzalloc(sizeof(*opts), GFP_KERNEL);
if (!opts)
return ERR_PTR(-ENOMEM);
opts->func_inst.free_func_inst = acm_free_instance;
+#ifndef CONFIG_USB_F_ACM_DUMMY
ret = gserial_alloc_line(&opts->port_num);
if (ret) {
kfree(opts);
return ERR_PTR(ret);
}
+#endif
config_group_init_type_name(&opts->func_inst.group, "",
&acm_func_type);
return &opts->func_inst;