In order for f_fs.c to become a module it cannot be directly sourced into other files. Consequently, if it itself includes some header file with static function prototypes, it is no good if the header is included in some other places. This patch moves those static prototypes into the f_fs.c. Since the common part is now in UAPI and f_fs is the last user of the include/linux/usb/functionfs.h, it can be deleted. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> --- drivers/usb/gadget/f_fs.c | 29 ++++++++++++++++++++++++++++- include/linux/usb/functionfs.h | 36 ------------------------------------ 2 files changed, 28 insertions(+), 37 deletions(-) delete mode 100644 include/linux/usb/functionfs.h diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index c377ff8..f5a66e9 100644 --- a/drivers/usb/gadget/f_fs.c +++ b/drivers/usb/gadget/f_fs.c @@ -25,7 +25,7 @@ #include <asm/unaligned.h> #include <linux/usb/composite.h> -#include <linux/usb/functionfs.h> +#include <uapi/linux/usb/functionfs.h> #define FUNCTIONFS_MAGIC 0xa647361 /* Chosen by a honest dice roll ;) */ @@ -48,6 +48,33 @@ #define ENTER() pr_vdebug("%s()\n", __func__) +struct ffs_data; +struct usb_composite_dev; +struct usb_configuration; + + +static int functionfs_init(void) __attribute__((warn_unused_result)); +static void functionfs_cleanup(void); + +static int functionfs_bind(struct ffs_data *ffs, struct usb_composite_dev *cdev) + __attribute__((warn_unused_result, nonnull)); +static void functionfs_unbind(struct ffs_data *ffs) + __attribute__((nonnull)); + +static int functionfs_bind_config(struct usb_composite_dev *cdev, + struct usb_configuration *c, + struct ffs_data *ffs) + __attribute__((warn_unused_result, nonnull)); + + +static int functionfs_ready_callback(struct ffs_data *ffs) + __attribute__((warn_unused_result, nonnull)); +static void functionfs_closed_callback(struct ffs_data *ffs) + __attribute__((nonnull)); +static void *functionfs_acquire_dev_callback(const char *dev_name) + __attribute__((warn_unused_result, nonnull)); +static void functionfs_release_dev_callback(struct ffs_data *ffs_data) + __attribute__((nonnull)); /* The data structure and setup file ****************************************/ diff --git a/include/linux/usb/functionfs.h b/include/linux/usb/functionfs.h deleted file mode 100644 index 65d0a88..0000000 --- a/include/linux/usb/functionfs.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef __LINUX_FUNCTIONFS_H__ -#define __LINUX_FUNCTIONFS_H__ 1 - -#include <uapi/linux/usb/functionfs.h> - - -struct ffs_data; -struct usb_composite_dev; -struct usb_configuration; - - -static int functionfs_init(void) __attribute__((warn_unused_result)); -static void functionfs_cleanup(void); - -static int functionfs_bind(struct ffs_data *ffs, struct usb_composite_dev *cdev) - __attribute__((warn_unused_result, nonnull)); -static void functionfs_unbind(struct ffs_data *ffs) - __attribute__((nonnull)); - -static int functionfs_bind_config(struct usb_composite_dev *cdev, - struct usb_configuration *c, - struct ffs_data *ffs) - __attribute__((warn_unused_result, nonnull)); - - -static int functionfs_ready_callback(struct ffs_data *ffs) - __attribute__((warn_unused_result, nonnull)); -static void functionfs_closed_callback(struct ffs_data *ffs) - __attribute__((nonnull)); -static void *functionfs_acquire_dev_callback(const char *dev_name) - __attribute__((warn_unused_result, nonnull)); -static void functionfs_release_dev_callback(struct ffs_data *ffs_data) - __attribute__((nonnull)); - - -#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