[PATCH v4 42/46] usb/gadget: f_fs: remove compatibility layer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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_fs.c |   70 ---------------------------------------------
 1 files changed, 0 insertions(+), 70 deletions(-)

diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
index 38ba133..5d302ae 100644
--- a/drivers/usb/gadget/f_fs.c
+++ b/drivers/usb/gadget/f_fs.c
@@ -36,14 +36,6 @@ struct ffs_data;
 struct usb_composite_dev;
 struct usb_configuration;
 
-#ifdef USB_FFS_INCLUDED
-
-static int functionfs_bind_config(struct usb_composite_dev *cdev,
-				  struct usb_configuration *c,
-				  struct ffs_data *ffs)
-	__attribute__((warn_unused_result, nonnull));
-#endif
-
 
 /* Reference counter handling */
 static void ffs_data_get(struct ffs_data *ffs);
@@ -1081,9 +1073,7 @@ int functionfs_init(struct ffs_callback_ops *cb_ops)
 
 	return ret;
 }
-#ifndef USB_FFS_INCLUDED
 EXPORT_SYMBOL(functionfs_init);
-#endif
 
 void functionfs_cleanup(void)
 {
@@ -1092,9 +1082,7 @@ void functionfs_cleanup(void)
 	pr_info("unloading\n");
 	unregister_filesystem(&ffs_fs_type);
 }
-#ifndef USB_FFS_INCLUDED
 EXPORT_SYMBOL(functionfs_cleanup);
-#endif
 
 /* ffs_data and ffs_function construction and destruction code **************/
 
@@ -1242,9 +1230,7 @@ int functionfs_bind(struct ffs_data *ffs, struct usb_composite_dev *cdev)
 	ffs_data_get(ffs);
 	return 0;
 }
-#ifndef USB_FFS_INCLUDED
 EXPORT_SYMBOL(functionfs_bind);
-#endif
 
 void functionfs_unbind(struct ffs_data *ffs)
 {
@@ -1258,9 +1244,7 @@ void functionfs_unbind(struct ffs_data *ffs)
 		clear_bit(FFS_FL_BOUND, &ffs->flags);
 	}
 }
-#ifndef USB_FFS_INCLUDED
 EXPORT_SYMBOL(functionfs_unbind);
-#endif
 
 static int ffs_epfiles_create(struct ffs_data *ffs)
 {
@@ -1311,46 +1295,6 @@ static void ffs_epfiles_destroy(struct ffs_epfile *epfiles, unsigned count)
 	kfree(epfiles);
 }
 
-#ifdef USB_FFS_INCLUDED
-
-static int functionfs_bind_config(struct usb_composite_dev *cdev,
-				  struct usb_configuration *c,
-				  struct ffs_data *ffs)
-{
-	struct ffs_function *func;
-	int ret;
-
-	ENTER();
-
-	func = kzalloc(sizeof *func, GFP_KERNEL);
-	if (unlikely(!func))
-		return -ENOMEM;
-
-	func->function.name    = "Function FS Gadget";
-	func->function.strings = ffs->stringtabs;
-
-	func->function.bind    = ffs_func_bind;
-	func->function.unbind  = ffs_func_unbind;
-	func->function.set_alt = ffs_func_set_alt;
-	func->function.disable = ffs_func_disable;
-	func->function.setup   = ffs_func_setup;
-	func->function.suspend = ffs_func_suspend;
-	func->function.resume  = ffs_func_resume;
-
-	func->conf   = c;
-	func->gadget = cdev->gadget;
-	func->ffs = ffs;
-	ffs_data_get(ffs);
-
-	ret = usb_add_function(c, &func->function);
-	if (unlikely(ret))
-		ffs_func_free(func);
-
-	return ret;
-}
-
-#else
-
 static void functionfs_free_inst(struct usb_function_instance *f)
 {
 	struct ffs_opts *opts;
@@ -1415,8 +1359,6 @@ static struct usb_function *functionfs_alloc(struct usb_function_instance *fi)
 
 DECLARE_USB_FUNCTION_INIT(functionfs, functionfs_alloc_inst, functionfs_alloc);
 
-#endif
-
 static void ffs_func_free(struct ffs_function *func)
 {
 	struct ffs_ep *ep         = func->eps;
@@ -1438,16 +1380,6 @@ static void ffs_func_free(struct ffs_function *func)
 
 	kfree(func->eps);
 	func->eps = NULL;
-
-#ifdef USB_FFS_INCLUDED
-	/*
-	 * eps and interfaces_nums are allocated in the same chunk so
-	 * only one free is required.  Descriptors are also allocated
-	 * in the same chunk.
-	 */
-
-	kfree(func);
-#endif
 }
 
 static void ffs_func_eps_disable(struct ffs_function *func)
@@ -2378,7 +2310,5 @@ static char *ffs_prepare_buffer(const char __user *buf, size_t len)
 	return data;
 }
 
-#ifndef USB_FFS_INCLUDED
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Michal Nazarewicz");
-#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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux