This patch moves config.c into libcomposite and updates all gadgets. Acked-by: Michal Nazarewicz <min...@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bige...@linutronix.de> --- drivers/usb/gadget/Makefile | 2 +- drivers/usb/gadget/acm_ms.c | 1 - drivers/usb/gadget/audio.c | 1 - drivers/usb/gadget/cdc2.c | 1 - drivers/usb/gadget/config.c | 6 ++++-- drivers/usb/gadget/ether.c | 1 - drivers/usb/gadget/file_storage.c | 1 - drivers/usb/gadget/g_ffs.c | 1 - drivers/usb/gadget/gmidi.c | 1 - drivers/usb/gadget/hid.c | 1 - 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 - 19 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile index eadbc86..9515ed0 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 +libcomposite-y := usbstring.o config.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 9820960..3078d79 100644 --- a/drivers/usb/gadget/acm_ms.c +++ b/drivers/usb/gadget/acm_ms.c @@ -42,7 +42,6 @@ */ #include "composite.c" -#include "config.c" #include "epautoconf.c" #include "u_serial.c" #include "f_acm.c" diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c index 76e54b4..9e85df2 100644 --- a/drivers/usb/gadget/audio.c +++ b/drivers/usb/gadget/audio.c @@ -27,7 +27,6 @@ * a "gcc --combine ... part1.c part2.c part3.c ... " build would. */ #include "composite.c" -#include "config.c" #include "epautoconf.c" /* string IDs are assigned dynamically */ diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c index 74a9c7f..d06d079 100644 --- a/drivers/usb/gadget/cdc2.c +++ b/drivers/usb/gadget/cdc2.c @@ -44,7 +44,6 @@ */ #include "composite.c" -#include "config.c" #include "epautoconf.c" #include "u_serial.c" #include "f_acm.c" diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c index 7542a72..e3a9892 100644 --- a/drivers/usb/gadget/config.c +++ b/drivers/usb/gadget/config.c @@ -12,6 +12,7 @@ #include <linux/errno.h> #include <linux/slab.h> #include <linux/kernel.h> +#include <linux/module.h> #include <linux/list.h> #include <linux/string.h> #include <linux/device.h> @@ -53,7 +54,7 @@ usb_descriptor_fillbuf(void *buf, unsigned buflen, } return dest - (u8 *)buf; } - +EXPORT_SYMBOL_GPL(usb_descriptor_fillbuf); /** * usb_gadget_config_buf - builts a complete configuration descriptor @@ -106,6 +107,7 @@ int usb_gadget_config_buf( cp->bmAttributes |= USB_CONFIG_ATT_ONE; return len; } +EXPORT_SYMBOL_GPL(usb_gadget_config_buf); /** * usb_copy_descriptors - copy a vector of USB descriptors @@ -155,4 +157,4 @@ usb_copy_descriptors(struct usb_descriptor_header **src) return ret; } - +EXPORT_SYMBOL_GPL(usb_copy_descriptors); diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index e16094e..557021e 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 "config.c" #include "epautoconf.c" #include "f_ecm.c" diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 8d0166b..77cf108 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -265,7 +265,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 "config.c" #include "epautoconf.c" /*-------------------------------------------------------------------------*/ diff --git a/drivers/usb/gadget/g_ffs.c b/drivers/usb/gadget/g_ffs.c index 407b5cc..2409570 100644 --- a/drivers/usb/gadget/g_ffs.c +++ b/drivers/usb/gadget/g_ffs.c @@ -24,7 +24,6 @@ */ #include "composite.c" -#include "config.c" #include "epautoconf.c" #if defined CONFIG_USB_FUNCTIONFS_ETH || defined CONFIG_USB_FUNCTIONFS_RNDIS diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c index 135b390..68a79b4 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 "config.c" #include "epautoconf.c" #include "f_midi.c" diff --git a/drivers/usb/gadget/hid.c b/drivers/usb/gadget/hid.c index effda2e..917c6ed 100644 --- a/drivers/usb/gadget/hid.c +++ b/drivers/usb/gadget/hid.c @@ -35,7 +35,6 @@ */ #include "composite.c" -#include "config.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 a7f32c3..9675e61 100644 --- a/drivers/usb/gadget/mass_storage.c +++ b/drivers/usb/gadget/mass_storage.c @@ -49,7 +49,6 @@ */ #include "composite.c" -#include "config.c" #include "epautoconf.c" #include "f_mass_storage.c" diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index 71c1fab..6b6c128 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c @@ -44,7 +44,6 @@ MODULE_LICENSE("GPL"); */ #include "composite.c" -#include "config.c" #include "epautoconf.c" #include "f_mass_storage.c" diff --git a/drivers/usb/gadget/ncm.c b/drivers/usb/gadget/ncm.c index d7e6b1e..ce8d08e 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 "config.c" #include "epautoconf.c" #include "f_ncm.c" diff --git a/drivers/usb/gadget/nokia.c b/drivers/usb/gadget/nokia.c index 474c77c..e2f4b9b 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 "config.c" #include "epautoconf.c" #include "u_serial.c" diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index c55e7d9..310b22d 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 "config.c" #include "epautoconf.c" /*-------------------------------------------------------------------------*/ diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index 88baa9e..39990be 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 "config.c" #include "epautoconf.c" #include "f_acm.c" diff --git a/drivers/usb/gadget/tcm_usb_gadget.c b/drivers/usb/gadget/tcm_usb_gadget.c index 327af68..926e0fa 100644 --- a/drivers/usb/gadget/tcm_usb_gadget.c +++ b/drivers/usb/gadget/tcm_usb_gadget.c @@ -26,7 +26,6 @@ #include <asm/unaligned.h> #include "epautoconf.c" -#include "config.c" #include "composite.c" #include "tcm_usb_gadget.h" diff --git a/drivers/usb/gadget/webcam.c b/drivers/usb/gadget/webcam.c index dc8fd5c..5e500e8 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 "config.c" #include "epautoconf.c" #include "uvc_queue.c" diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index 4469be8..e39a3b5 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 "config.c" #include "epautoconf.c" #include "f_sourcesink.c" -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html