Commit 5ca8d3ec authored by Andrzej Pietrasiewicz's avatar Andrzej Pietrasiewicz Committed by Felipe Balbi

usb: gadget: f_hid: use usb_gstrings_attach

Before configfs is integrated the usb_gstrings_attach() interface
must be used.
Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 5d66a391
...@@ -582,18 +582,17 @@ static int hidg_bind(struct usb_configuration *c, struct usb_function *f) ...@@ -582,18 +582,17 @@ static int hidg_bind(struct usb_configuration *c, struct usb_function *f)
{ {
struct usb_ep *ep; struct usb_ep *ep;
struct f_hidg *hidg = func_to_hidg(f); struct f_hidg *hidg = func_to_hidg(f);
struct usb_string *us;
struct device *device; struct device *device;
int status; int status;
dev_t dev; dev_t dev;
/* maybe allocate device-global string IDs, and patch descriptors */ /* maybe allocate device-global string IDs, and patch descriptors */
if (ct_func_string_defs[CT_FUNC_HID_IDX].id == 0) { us = usb_gstrings_attach(c->cdev, ct_func_strings,
status = usb_string_id(c->cdev); ARRAY_SIZE(ct_func_string_defs));
if (status < 0) if (IS_ERR(us))
return status; return PTR_ERR(us);
ct_func_string_defs[CT_FUNC_HID_IDX].id = status; hidg_interface_desc.iInterface = us[CT_FUNC_HID_IDX].id;
hidg_interface_desc.iInterface = status;
}
/* allocate instance-specific interface IDs, and patch descriptors */ /* allocate instance-specific interface IDs, and patch descriptors */
status = usb_interface_id(c, f); status = usb_interface_id(c, f);
...@@ -806,7 +805,6 @@ struct usb_function *hidg_alloc(struct usb_function_instance *fi) ...@@ -806,7 +805,6 @@ struct usb_function *hidg_alloc(struct usb_function_instance *fi)
} }
hidg->func.name = "hid"; hidg->func.name = "hid";
hidg->func.strings = ct_func_strings;
hidg->func.bind = hidg_bind; hidg->func.bind = hidg_bind;
hidg->func.unbind = hidg_unbind; hidg->func.unbind = hidg_unbind;
hidg->func.set_alt = hidg_set_alt; hidg->func.set_alt = hidg_set_alt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment