There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> --- drivers/usb/gadget/f_mass_storage.c | 66 ----------------------------------- 1 files changed, 0 insertions(+), 66 deletions(-) diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index 7ab813d..48b269b 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -2528,9 +2528,7 @@ void fsg_common_put(struct fsg_common *common) { kref_put(&common->ref, fsg_common_release); } -#ifndef USB_FMS_INCLUDED EXPORT_SYMBOL(fsg_common_put); -#endif /* check if fsg_num_buffers is within a valid range */ static inline int fsg_num_buffers_validate(void) @@ -2748,9 +2746,7 @@ error_release: fsg_common_release(&common->ref); return ERR_PTR(rc); } -#ifndef USB_FMS_INCLUDED EXPORT_SYMBOL(fsg_common_init_memset); -#endif static void fsg_common_release(struct kref *ref) { @@ -2867,64 +2863,6 @@ static struct usb_gadget_strings *fsg_strings_array[] = { NULL, }; -#ifdef USB_FMS_INCLUDED - -static void old_fsg_unbind(struct usb_configuration *c, struct usb_function *f) -{ - struct fsg_dev *fsg = fsg_from_func(f); - struct fsg_common *common = fsg->common; - - DBG(fsg, "unbind\n"); - if (fsg->common->fsg == fsg) { - fsg->common->new_fsg = NULL; - raise_exception(fsg->common, FSG_STATE_CONFIG_CHANGE); - /* FIXME: make interruptible or killable somehow? */ - wait_event(common->fsg_wait, common->fsg != fsg); - } - - fsg_common_put(common); - usb_free_all_descriptors(&fsg->function); - kfree(fsg); -} - -static int fsg_bind_config(struct usb_composite_dev *cdev, - struct usb_configuration *c, - struct fsg_common *common) -{ - struct fsg_dev *fsg; - int rc; - - fsg = kzalloc(sizeof *fsg, GFP_KERNEL); - if (unlikely(!fsg)) - return -ENOMEM; - - fsg->function.name = FSG_DRIVER_DESC; - fsg->function.strings = fsg_strings_array; - fsg->function.bind = fsg_bind; - fsg->function.unbind = old_fsg_unbind; - fsg->function.setup = fsg_setup; - fsg->function.set_alt = fsg_set_alt; - fsg->function.disable = fsg_disable; - - fsg->common = common; - /* - * Our caller holds a reference to common structure so we - * don't have to be worry about it being freed until we return - * from this function. So instead of incrementing counter now - * and decrement in error recovery we increment it only when - * call to usb_add_function() was successful. - */ - - rc = usb_add_function(c, &fsg->function); - if (unlikely(rc)) - kfree(fsg); - else - fsg_common_get(fsg->common); - return rc; -} - -#else - static void fsg_free_inst(struct usb_function_instance *fi) { struct fsg_common *common; @@ -3006,8 +2944,6 @@ DECLARE_USB_FUNCTION_INIT(mass_storage, fsg_alloc_inst, fsg_alloc); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Michal Nazarewicz"); -#endif - /************************* Module parameters *************************/ @@ -3041,7 +2977,5 @@ void fsg_config_from_params(struct fsg_config *cfg, /* Finalise */ cfg->can_stall = params->stall; } -#ifndef USB_FMS_INCLUDED EXPORT_SYMBOL(fsg_config_from_params); -#endif -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html