.bmAttributes = USB_CONFIG_ATT_SELFPOWER,
};
-static int usbg_bind(struct usb_configuration *c, struct usb_function *f)
+static int tcm_bind(struct usb_configuration *c, struct usb_function *f)
{
struct f_uas *fu = to_f_uas(f);
struct usb_gadget *gadget = c->cdev->gadget;
return -ENOTSUPP;
}
-static void usbg_unbind(struct usb_configuration *c, struct usb_function *f)
+static void tcm_unbind(struct usb_configuration *c, struct usb_function *f)
{
struct f_uas *fu = to_f_uas(f);
unsigned int alt;
};
-static void usbg_delayed_set_alt(struct work_struct *wq)
+static void tcm_delayed_set_alt(struct work_struct *wq)
{
struct guas_setup_wq *work = container_of(wq, struct guas_setup_wq,
work);
usb_composite_setup_continue(fu->function.config->cdev);
}
-static int usbg_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
+static int tcm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
{
struct f_uas *fu = to_f_uas(f);
work = kmalloc(sizeof(*work), GFP_ATOMIC);
if (!work)
return -ENOMEM;
- INIT_WORK(&work->work, usbg_delayed_set_alt);
+ INIT_WORK(&work->work, tcm_delayed_set_alt);
work->fu = fu;
work->alt = alt;
schedule_work(&work->work);
return -EOPNOTSUPP;
}
-static void usbg_disable(struct usb_function *f)
+static void tcm_disable(struct usb_function *f)
{
struct f_uas *fu = to_f_uas(f);
fu->flags = 0;
}
-static int usbg_setup(struct usb_function *f,
+static int tcm_setup(struct usb_function *f,
const struct usb_ctrlrequest *ctrl)
{
struct f_uas *fu = to_f_uas(f);
return usbg_bot_setup(f, ctrl);
}
-static int usbg_cfg_bind(struct usb_configuration *c)
+static int tcm_bind_config(struct usb_configuration *c)
{
struct f_uas *fu;
int ret;
if (!fu)
return -ENOMEM;
fu->function.name = "Target Function";
- fu->function.bind = usbg_bind;
- fu->function.unbind = usbg_unbind;
- fu->function.set_alt = usbg_set_alt;
- fu->function.setup = usbg_setup;
- fu->function.disable = usbg_disable;
+ fu->function.bind = tcm_bind;
+ fu->function.unbind = tcm_unbind;
+ fu->function.set_alt = tcm_set_alt;
+ fu->function.setup = tcm_setup;
+ fu->function.disable = tcm_disable;
fu->function.strings = tcm_strings;
fu->tpg = the_only_tpg_I_currently_have;
usbg_us_strings[USB_G_STR_CONFIG].id;
ret = usb_add_config(cdev, &usbg_config_driver,
- usbg_cfg_bind);
+ tcm_bind_config);
if (ret)
return ret;
usb_composite_overwrite_options(cdev, &coverwrite);