diff options
Diffstat (limited to 'drivers/usb/gadget/configfs.c')
-rw-r--r-- | drivers/usb/gadget/configfs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index 25885112fa3..7d1cc01796b 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c @@ -4,6 +4,7 @@ #include <linux/device.h> #include <linux/usb/composite.h> #include <linux/usb/gadget_configfs.h> +#include "configfs.h" int check_user_usb_string(const char *name, struct usb_gadget_strings *stringtab_dev) @@ -564,6 +565,13 @@ static struct config_group *function_make( usb_put_function_instance(fi); return ERR_PTR(ret); } + if (fi->set_inst_name) { + ret = fi->set_inst_name(fi, instance_name); + if (ret) { + usb_put_function_instance(fi); + return ERR_PTR(ret); + } + } gi = container_of(group, struct gadget_info, functions_group); |