This patch adds epautoconf.c into libcomposite and updates all gadgets. Acked-by: Michal Nazarewicz <mina86@xxxxxxxxxx> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> --- drivers/staging/ccg/ccg.c | 1 - drivers/usb/gadget/Makefile | 2 +- drivers/usb/gadget/acm_ms.c | 1 - drivers/usb/gadget/audio.c | 2 +- drivers/usb/gadget/cdc2.c | 1 - drivers/usb/gadget/dbgp.c | 3 --- drivers/usb/gadget/epautoconf.c | 6 ++++-- drivers/usb/gadget/ether.c | 1 - drivers/usb/gadget/file_storage.c | 13 ------------- drivers/usb/gadget/g_ffs.c | 1 - drivers/usb/gadget/gadget_chips.h | 2 ++ drivers/usb/gadget/gmidi.c | 1 - drivers/usb/gadget/hid.c | 2 +- drivers/usb/gadget/mass_storage.c | 1 - drivers/usb/gadget/multi.c | 1 - drivers/usb/gadget/ncm.c | 1 - drivers/usb/gadget/nokia.c | 1 - drivers/usb/gadget/printer.c | 1 - drivers/usb/gadget/serial.c | 1 - drivers/usb/gadget/tcm_usb_gadget.c | 1 - drivers/usb/gadget/webcam.c | 1 - drivers/usb/gadget/zero.c | 1 - 22 files changed, 9 insertions(+), 36 deletions(-) diff --git a/drivers/staging/ccg/ccg.c b/drivers/staging/ccg/ccg.c index 0b31369..1f6c249 100644 --- a/drivers/staging/ccg/ccg.c +++ b/drivers/staging/ccg/ccg.c @@ -44,7 +44,6 @@ * the runtime footprint, and giving us at least some parts of what * a "gcc --combine ... part1.c part2.c part3.c ... " build would. */ -#include "../../usb/gadget/epautoconf.c" #include "composite.c" #include "../../usb/gadget/f_mass_storage.c" diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile index f6387b4..d394162 100644 --- a/drivers/usb/gadget/Makefile +++ b/drivers/usb/gadget/Makefile @@ -5,7 +5,7 @@ ccflags-$(CONFIG_USB_GADGET_DEBUG) := -DDEBUG obj-$(CONFIG_USB_GADGET) += udc-core.o obj-$(CONFIG_USB_LIBCOMPOSITE) += libcomposite.o -libcomposite-y := usbstring.o config.o +libcomposite-y := usbstring.o config.o epautoconf.o obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o obj-$(CONFIG_USB_NET2272) += net2272.o obj-$(CONFIG_USB_NET2280) += net2280.o diff --git a/drivers/usb/gadget/acm_ms.c b/drivers/usb/gadget/acm_ms.c index 3078d79..5db661d 100644 --- a/drivers/usb/gadget/acm_ms.c +++ b/drivers/usb/gadget/acm_ms.c @@ -42,7 +42,6 @@ */ #include "composite.c" -#include "epautoconf.c" #include "u_serial.c" #include "f_acm.c" #include "f_mass_storage.c" diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c index 9e85df2..689d142 100644 --- a/drivers/usb/gadget/audio.c +++ b/drivers/usb/gadget/audio.c @@ -14,6 +14,7 @@ #include <linux/kernel.h> #include <linux/utsname.h> +#include "gadget_chips.h" #define DRIVER_DESC "Linux USB Audio Gadget" #define DRIVER_VERSION "Feb 2, 2012" @@ -27,7 +28,6 @@ * a "gcc --combine ... part1.c part2.c part3.c ... " build would. */ #include "composite.c" -#include "epautoconf.c" /* string IDs are assigned dynamically */ diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c index d06d079..8e386cf 100644 --- a/drivers/usb/gadget/cdc2.c +++ b/drivers/usb/gadget/cdc2.c @@ -44,7 +44,6 @@ */ #include "composite.c" -#include "epautoconf.c" #include "u_serial.c" #include "f_acm.c" #include "f_ecm.c" diff --git a/drivers/usb/gadget/dbgp.c b/drivers/usb/gadget/dbgp.c index cc17465..87d1650 100644 --- a/drivers/usb/gadget/dbgp.c +++ b/drivers/usb/gadget/dbgp.c @@ -13,9 +13,6 @@ #include <linux/usb/ch9.h> #include <linux/usb/gadget.h> -/* See comments in "zero.c" */ -#include "epautoconf.c" - #ifdef CONFIG_USB_G_DBGP_SERIAL #include "u_serial.c" #endif diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c index d5a905d..a777f7b 100644 --- a/drivers/usb/gadget/epautoconf.c +++ b/drivers/usb/gadget/epautoconf.c @@ -10,6 +10,7 @@ */ #include <linux/kernel.h> +#include <linux/module.h> #include <linux/init.h> #include <linux/types.h> #include <linux/device.h> @@ -315,6 +316,7 @@ found_ep: ep->comp_desc = NULL; return ep; } +EXPORT_SYMBOL_GPL(usb_ep_autoconfig_ss); /** * usb_ep_autoconfig() - choose an endpoint matching the @@ -354,7 +356,7 @@ struct usb_ep *usb_ep_autoconfig( { return usb_ep_autoconfig_ss(gadget, desc, NULL); } - +EXPORT_SYMBOL_GPL(usb_ep_autoconfig); /** * usb_ep_autoconfig_reset - reset endpoint autoconfig state @@ -375,4 +377,4 @@ void usb_ep_autoconfig_reset (struct usb_gadget *gadget) gadget->in_epnum = 0; gadget->out_epnum = 0; } - +EXPORT_SYMBOL_GPL(usb_ep_autoconfig_reset); diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 557021e..39eb718 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -103,7 +103,6 @@ static inline bool has_rndis(void) * a "gcc --combine ... part1.c part2.c part3.c ... " build would. */ #include "composite.c" -#include "epautoconf.c" #include "f_ecm.c" #include "f_subset.c" diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 77cf108..ce362f7 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -256,19 +256,6 @@ #include "gadget_chips.h" - - -/* - * Kbuild is not very cooperative with respect to linking separately - * compiled library objects into one module. So for now we won't use - * separate compilation ... ensuring init/exit sections work to shrink - * the runtime footprint, and giving us at least some parts of what - * a "gcc --combine ... part1.c part2.c part3.c ... " build would. - */ -#include "epautoconf.c" - -/*-------------------------------------------------------------------------*/ - #define DRIVER_DESC "File-backed Storage Gadget" #define DRIVER_NAME "g_file_storage" #define DRIVER_VERSION "1 September 2010" diff --git a/drivers/usb/gadget/g_ffs.c b/drivers/usb/gadget/g_ffs.c index 2409570..c3a583e 100644 --- a/drivers/usb/gadget/g_ffs.c +++ b/drivers/usb/gadget/g_ffs.c @@ -24,7 +24,6 @@ */ #include "composite.c" -#include "epautoconf.c" #if defined CONFIG_USB_FUNCTIONFS_ETH || defined CONFIG_USB_FUNCTIONFS_RNDIS # if defined USB_ETH_RNDIS diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h index b8b3a34..6458e95 100644 --- a/drivers/usb/gadget/gadget_chips.h +++ b/drivers/usb/gadget/gadget_chips.h @@ -15,6 +15,8 @@ #ifndef __GADGET_CHIPS_H #define __GADGET_CHIPS_H +#include <linux/usb/gadget.h> + /* * NOTICE: the entries below are alphabetical and should be kept * that way. diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c index 68a79b4..0c70708 100644 --- a/drivers/usb/gadget/gmidi.c +++ b/drivers/usb/gadget/gmidi.c @@ -38,7 +38,6 @@ #include "gadget_chips.h" #include "composite.c" -#include "epautoconf.c" #include "f_midi.c" /*-------------------------------------------------------------------------*/ diff --git a/drivers/usb/gadget/hid.c b/drivers/usb/gadget/hid.c index 917c6ed..4880cdd 100644 --- a/drivers/usb/gadget/hid.c +++ b/drivers/usb/gadget/hid.c @@ -16,6 +16,7 @@ #include <linux/platform_device.h> #include <linux/list.h> +#include "gadget_chips.h" #define DRIVER_DESC "HID Gadget" #define DRIVER_VERSION "2010/03/16" @@ -35,7 +36,6 @@ */ #include "composite.c" -#include "epautoconf.c" #include "f_hid.c" diff --git a/drivers/usb/gadget/mass_storage.c b/drivers/usb/gadget/mass_storage.c index 9675e61..0b0f008 100644 --- a/drivers/usb/gadget/mass_storage.c +++ b/drivers/usb/gadget/mass_storage.c @@ -49,7 +49,6 @@ */ #include "composite.c" -#include "epautoconf.c" #include "f_mass_storage.c" /*-------------------------------------------------------------------------*/ diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index 6b6c128..72fb301 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c @@ -44,7 +44,6 @@ MODULE_LICENSE("GPL"); */ #include "composite.c" -#include "epautoconf.c" #include "f_mass_storage.c" diff --git a/drivers/usb/gadget/ncm.c b/drivers/usb/gadget/ncm.c index ce8d08e..69b660b 100644 --- a/drivers/usb/gadget/ncm.c +++ b/drivers/usb/gadget/ncm.c @@ -37,7 +37,6 @@ * a "gcc --combine ... part1.c part2.c part3.c ... " build would. */ #include "composite.c" -#include "epautoconf.c" #include "f_ncm.c" #include "u_ether.c" diff --git a/drivers/usb/gadget/nokia.c b/drivers/usb/gadget/nokia.c index e2f4b9b..6834c62 100644 --- a/drivers/usb/gadget/nokia.c +++ b/drivers/usb/gadget/nokia.c @@ -39,7 +39,6 @@ * a "gcc --combine ... part1.c part2.c part3.c ... " build would. */ #include "composite.c" -#include "epautoconf.c" #include "u_serial.c" #include "f_acm.c" diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 310b22d..3d3d20d 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c @@ -52,7 +52,6 @@ * a "gcc --combine ... part1.c part2.c part3.c ... " build would. */ #include "composite.c" -#include "epautoconf.c" /*-------------------------------------------------------------------------*/ diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index 39990be..098c3d0 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c @@ -38,7 +38,6 @@ * a "gcc --combine ... part1.c part2.c part3.c ... " build would. */ #include "composite.c" -#include "epautoconf.c" #include "f_acm.c" #include "f_obex.c" diff --git a/drivers/usb/gadget/tcm_usb_gadget.c b/drivers/usb/gadget/tcm_usb_gadget.c index 926e0fa..e64a759 100644 --- a/drivers/usb/gadget/tcm_usb_gadget.c +++ b/drivers/usb/gadget/tcm_usb_gadget.c @@ -25,7 +25,6 @@ #include <target/configfs_macros.h> #include <asm/unaligned.h> -#include "epautoconf.c" #include "composite.c" #include "tcm_usb_gadget.h" diff --git a/drivers/usb/gadget/webcam.c b/drivers/usb/gadget/webcam.c index 5e500e8..66dfca8 100644 --- a/drivers/usb/gadget/webcam.c +++ b/drivers/usb/gadget/webcam.c @@ -24,7 +24,6 @@ * a "gcc --combine ... part1.c part2.c part3.c ... " build would. */ #include "composite.c" -#include "epautoconf.c" #include "uvc_queue.c" #include "uvc_video.c" diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index e39a3b5..9a9adee 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c @@ -59,7 +59,6 @@ * a "gcc --combine ... part1.c part2.c part3.c ... " build would. */ #include "composite.c" -#include "epautoconf.c" #include "f_sourcesink.c" #include "f_loopback.c" -- 1.7.10.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