diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-09-06 14:11:27 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-09-10 09:13:03 -0400 |
commit | 721e2e91945bc2520d57d795dfe1b502ecec567c (patch) | |
tree | 367b0e0de9fabd165fdae6887902c3ae72a81bef /drivers | |
parent | cc2683c318a5bf192b75cd5c343b51009db0cf6c (diff) |
usb: gadget: libcomposite: move composite.c into libcomposite
This moves composite.c into libcomposite and updates all gadgets.
Finally!
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/Makefile | 3 | ||||
-rw-r--r-- | drivers/usb/gadget/acm_ms.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/audio.c | 11 | ||||
-rw-r--r-- | drivers/usb/gadget/cdc2.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/composite.c | 14 | ||||
-rw-r--r-- | drivers/usb/gadget/ether.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/f_hid.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/g_ffs.c | 3 | ||||
-rw-r--r-- | drivers/usb/gadget/gmidi.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/hid.c | 5 | ||||
-rw-r--r-- | drivers/usb/gadget/mass_storage.c | 3 | ||||
-rw-r--r-- | drivers/usb/gadget/multi.c | 3 | ||||
-rw-r--r-- | drivers/usb/gadget/ncm.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/nokia.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/printer.c | 12 | ||||
-rw-r--r-- | drivers/usb/gadget/serial.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/tcm_usb_gadget.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/webcam.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/zero.c | 2 |
19 files changed, 25 insertions, 51 deletions
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile index 4fec0e8ee000..5c4a1330b498 100644 --- a/drivers/usb/gadget/Makefile +++ b/drivers/usb/gadget/Makefile | |||
@@ -5,7 +5,8 @@ ccflags-$(CONFIG_USB_GADGET_DEBUG) := -DDEBUG | |||
5 | 5 | ||
6 | obj-$(CONFIG_USB_GADGET) += udc-core.o | 6 | obj-$(CONFIG_USB_GADGET) += udc-core.o |
7 | obj-$(CONFIG_USB_LIBCOMPOSITE) += libcomposite.o | 7 | obj-$(CONFIG_USB_LIBCOMPOSITE) += libcomposite.o |
8 | libcomposite-y := usbstring.o config.o epautoconf.o gadget_chips.o | 8 | libcomposite-y := usbstring.o config.o epautoconf.o |
9 | libcomposite-y += gadget_chips.o composite.o | ||
9 | obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o | 10 | obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o |
10 | obj-$(CONFIG_USB_NET2272) += net2272.o | 11 | obj-$(CONFIG_USB_NET2272) += net2272.o |
11 | obj-$(CONFIG_USB_NET2280) += net2280.o | 12 | obj-$(CONFIG_USB_NET2280) += net2280.o |
diff --git a/drivers/usb/gadget/acm_ms.c b/drivers/usb/gadget/acm_ms.c index d280f164887c..b0abc2518b38 100644 --- a/drivers/usb/gadget/acm_ms.c +++ b/drivers/usb/gadget/acm_ms.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/module.h> | ||
18 | 19 | ||
19 | #include "u_serial.h" | 20 | #include "u_serial.h" |
20 | 21 | ||
@@ -40,7 +41,6 @@ | |||
40 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. | 41 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. |
41 | */ | 42 | */ |
42 | 43 | ||
43 | #include "composite.c" | ||
44 | #include "u_serial.c" | 44 | #include "u_serial.c" |
45 | #include "f_acm.c" | 45 | #include "f_acm.c" |
46 | #include "f_mass_storage.c" | 46 | #include "f_mass_storage.c" |
diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c index 1f81e0f4fab9..1b9dee91d686 100644 --- a/drivers/usb/gadget/audio.c +++ b/drivers/usb/gadget/audio.c | |||
@@ -12,22 +12,13 @@ | |||
12 | /* #define VERBOSE_DEBUG */ | 12 | /* #define VERBOSE_DEBUG */ |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/module.h> | ||
15 | #include <linux/usb/composite.h> | 16 | #include <linux/usb/composite.h> |
16 | 17 | ||
17 | #include "gadget_chips.h" | 18 | #include "gadget_chips.h" |
18 | #define DRIVER_DESC "Linux USB Audio Gadget" | 19 | #define DRIVER_DESC "Linux USB Audio Gadget" |
19 | #define DRIVER_VERSION "Feb 2, 2012" | 20 | #define DRIVER_VERSION "Feb 2, 2012" |
20 | 21 | ||
21 | /*-------------------------------------------------------------------------*/ | ||
22 | |||
23 | /* | ||
24 | * Kbuild is not very cooperative with respect to linking separately | ||
25 | * compiled library objects into one module. So for now we won't use | ||
26 | * separate compilation ... ensuring init/exit sections work to shrink | ||
27 | * the runtime footprint, and giving us at least some parts of what | ||
28 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. | ||
29 | */ | ||
30 | #include "composite.c" | ||
31 | USB_GADGET_COMPOSITE_OPTIONS(); | 22 | USB_GADGET_COMPOSITE_OPTIONS(); |
32 | 23 | ||
33 | /* string IDs are assigned dynamically */ | 24 | /* string IDs are assigned dynamically */ |
diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c index 4e2060bf35e3..ba38d2a43723 100644 --- a/drivers/usb/gadget/cdc2.c +++ b/drivers/usb/gadget/cdc2.c | |||
@@ -43,7 +43,6 @@ USB_GADGET_COMPOSITE_OPTIONS(); | |||
43 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. | 43 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. |
44 | */ | 44 | */ |
45 | 45 | ||
46 | #include "composite.c" | ||
47 | #include "u_serial.c" | 46 | #include "u_serial.c" |
48 | #include "f_acm.c" | 47 | #include "f_acm.c" |
49 | #include "f_ecm.c" | 48 | #include "f_ecm.c" |
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index c7066cd4c95a..27ac36638827 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c | |||
@@ -154,6 +154,7 @@ ep_found: | |||
154 | } | 154 | } |
155 | return 0; | 155 | return 0; |
156 | } | 156 | } |
157 | EXPORT_SYMBOL_GPL(config_ep_by_speed); | ||
157 | 158 | ||
158 | /** | 159 | /** |
159 | * usb_add_function() - add a function to a configuration | 160 | * usb_add_function() - add a function to a configuration |
@@ -212,6 +213,7 @@ done: | |||
212 | function->name, function, value); | 213 | function->name, function, value); |
213 | return value; | 214 | return value; |
214 | } | 215 | } |
216 | EXPORT_SYMBOL_GPL(usb_add_function); | ||
215 | 217 | ||
216 | /** | 218 | /** |
217 | * usb_function_deactivate - prevent function and gadget enumeration | 219 | * usb_function_deactivate - prevent function and gadget enumeration |
@@ -248,6 +250,7 @@ int usb_function_deactivate(struct usb_function *function) | |||
248 | spin_unlock_irqrestore(&cdev->lock, flags); | 250 | spin_unlock_irqrestore(&cdev->lock, flags); |
249 | return status; | 251 | return status; |
250 | } | 252 | } |
253 | EXPORT_SYMBOL_GPL(usb_function_deactivate); | ||
251 | 254 | ||
252 | /** | 255 | /** |
253 | * usb_function_activate - allow function and gadget enumeration | 256 | * usb_function_activate - allow function and gadget enumeration |
@@ -278,6 +281,7 @@ int usb_function_activate(struct usb_function *function) | |||
278 | spin_unlock_irqrestore(&cdev->lock, flags); | 281 | spin_unlock_irqrestore(&cdev->lock, flags); |
279 | return status; | 282 | return status; |
280 | } | 283 | } |
284 | EXPORT_SYMBOL_GPL(usb_function_activate); | ||
281 | 285 | ||
282 | /** | 286 | /** |
283 | * usb_interface_id() - allocate an unused interface ID | 287 | * usb_interface_id() - allocate an unused interface ID |
@@ -314,6 +318,7 @@ int usb_interface_id(struct usb_configuration *config, | |||
314 | } | 318 | } |
315 | return -ENODEV; | 319 | return -ENODEV; |
316 | } | 320 | } |
321 | EXPORT_SYMBOL_GPL(usb_interface_id); | ||
317 | 322 | ||
318 | static int config_buf(struct usb_configuration *config, | 323 | static int config_buf(struct usb_configuration *config, |
319 | enum usb_device_speed speed, void *buf, u8 type) | 324 | enum usb_device_speed speed, void *buf, u8 type) |
@@ -754,6 +759,7 @@ done: | |||
754 | config->bConfigurationValue, status); | 759 | config->bConfigurationValue, status); |
755 | return status; | 760 | return status; |
756 | } | 761 | } |
762 | EXPORT_SYMBOL_GPL(usb_add_config); | ||
757 | 763 | ||
758 | static void remove_config(struct usb_composite_dev *cdev, | 764 | static void remove_config(struct usb_composite_dev *cdev, |
759 | struct usb_configuration *config) | 765 | struct usb_configuration *config) |
@@ -947,6 +953,7 @@ int usb_string_id(struct usb_composite_dev *cdev) | |||
947 | } | 953 | } |
948 | return -ENODEV; | 954 | return -ENODEV; |
949 | } | 955 | } |
956 | EXPORT_SYMBOL_GPL(usb_string_id); | ||
950 | 957 | ||
951 | /** | 958 | /** |
952 | * usb_string_ids() - allocate unused string IDs in batch | 959 | * usb_string_ids() - allocate unused string IDs in batch |
@@ -978,6 +985,7 @@ int usb_string_ids_tab(struct usb_composite_dev *cdev, struct usb_string *str) | |||
978 | 985 | ||
979 | return 0; | 986 | return 0; |
980 | } | 987 | } |
988 | EXPORT_SYMBOL_GPL(usb_string_ids_tab); | ||
981 | 989 | ||
982 | /** | 990 | /** |
983 | * usb_string_ids_n() - allocate unused string IDs in batch | 991 | * usb_string_ids_n() - allocate unused string IDs in batch |
@@ -1006,7 +1014,7 @@ int usb_string_ids_n(struct usb_composite_dev *c, unsigned n) | |||
1006 | c->next_string_id += n; | 1014 | c->next_string_id += n; |
1007 | return next + 1; | 1015 | return next + 1; |
1008 | } | 1016 | } |
1009 | 1017 | EXPORT_SYMBOL_GPL(usb_string_ids_n); | |
1010 | 1018 | ||
1011 | /*-------------------------------------------------------------------------*/ | 1019 | /*-------------------------------------------------------------------------*/ |
1012 | 1020 | ||
@@ -1572,6 +1580,7 @@ int usb_composite_probe(struct usb_composite_driver *driver) | |||
1572 | 1580 | ||
1573 | return usb_gadget_probe_driver(gadget_driver); | 1581 | return usb_gadget_probe_driver(gadget_driver); |
1574 | } | 1582 | } |
1583 | EXPORT_SYMBOL_GPL(usb_composite_probe); | ||
1575 | 1584 | ||
1576 | /** | 1585 | /** |
1577 | * usb_composite_unregister() - unregister a composite driver | 1586 | * usb_composite_unregister() - unregister a composite driver |
@@ -1584,6 +1593,7 @@ void usb_composite_unregister(struct usb_composite_driver *driver) | |||
1584 | { | 1593 | { |
1585 | usb_gadget_unregister_driver(&driver->gadget_driver); | 1594 | usb_gadget_unregister_driver(&driver->gadget_driver); |
1586 | } | 1595 | } |
1596 | EXPORT_SYMBOL_GPL(usb_composite_unregister); | ||
1587 | 1597 | ||
1588 | /** | 1598 | /** |
1589 | * usb_composite_setup_continue() - Continue with the control transfer | 1599 | * usb_composite_setup_continue() - Continue with the control transfer |
@@ -1620,6 +1630,7 @@ void usb_composite_setup_continue(struct usb_composite_dev *cdev) | |||
1620 | 1630 | ||
1621 | spin_unlock_irqrestore(&cdev->lock, flags); | 1631 | spin_unlock_irqrestore(&cdev->lock, flags); |
1622 | } | 1632 | } |
1633 | EXPORT_SYMBOL_GPL(usb_composite_setup_continue); | ||
1623 | 1634 | ||
1624 | static char *composite_default_mfr(struct usb_gadget *gadget) | 1635 | static char *composite_default_mfr(struct usb_gadget *gadget) |
1625 | { | 1636 | { |
@@ -1672,3 +1683,4 @@ void usb_composite_overwrite_options(struct usb_composite_dev *cdev, | |||
1672 | dev_str[USB_GADGET_PRODUCT_IDX].s = covr->product; | 1683 | dev_str[USB_GADGET_PRODUCT_IDX].s = covr->product; |
1673 | } | 1684 | } |
1674 | } | 1685 | } |
1686 | EXPORT_SYMBOL_GPL(usb_composite_overwrite_options); | ||
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index a5c272067625..d7ec87e0bfcb 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c | |||
@@ -100,8 +100,6 @@ static inline bool has_rndis(void) | |||
100 | * the runtime footprint, and giving us at least some parts of what | 100 | * the runtime footprint, and giving us at least some parts of what |
101 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. | 101 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. |
102 | */ | 102 | */ |
103 | #include "composite.c" | ||
104 | |||
105 | #include "f_ecm.c" | 103 | #include "f_ecm.c" |
106 | #include "f_subset.c" | 104 | #include "f_subset.c" |
107 | #ifdef USB_ETH_RNDIS | 105 | #ifdef USB_ETH_RNDIS |
diff --git a/drivers/usb/gadget/f_hid.c b/drivers/usb/gadget/f_hid.c index 77dbca099bcb..511e527178e2 100644 --- a/drivers/usb/gadget/f_hid.c +++ b/drivers/usb/gadget/f_hid.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/poll.h> | 17 | #include <linux/poll.h> |
18 | #include <linux/uaccess.h> | 18 | #include <linux/uaccess.h> |
19 | #include <linux/wait.h> | 19 | #include <linux/wait.h> |
20 | #include <linux/sched.h> | ||
20 | #include <linux/usb/g_hid.h> | 21 | #include <linux/usb/g_hid.h> |
21 | 22 | ||
22 | static int major, minors; | 23 | static int major, minors; |
diff --git a/drivers/usb/gadget/g_ffs.c b/drivers/usb/gadget/g_ffs.c index 9e62c20fb5bc..3953dd4d7186 100644 --- a/drivers/usb/gadget/g_ffs.c +++ b/drivers/usb/gadget/g_ffs.c | |||
@@ -21,9 +21,6 @@ | |||
21 | * the runtime footprint, and giving us at least some parts of what | 21 | * the runtime footprint, and giving us at least some parts of what |
22 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. | 22 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. |
23 | */ | 23 | */ |
24 | |||
25 | #include "composite.c" | ||
26 | |||
27 | #if defined CONFIG_USB_FUNCTIONFS_ETH || defined CONFIG_USB_FUNCTIONFS_RNDIS | 24 | #if defined CONFIG_USB_FUNCTIONFS_ETH || defined CONFIG_USB_FUNCTIONFS_RNDIS |
28 | # if defined USB_ETH_RNDIS | 25 | # if defined USB_ETH_RNDIS |
29 | # undef USB_ETH_RNDIS | 26 | # undef USB_ETH_RNDIS |
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c index 59621ef7657d..4181524d1c4b 100644 --- a/drivers/usb/gadget/gmidi.c +++ b/drivers/usb/gadget/gmidi.c | |||
@@ -30,13 +30,13 @@ | |||
30 | #include <sound/rawmidi.h> | 30 | #include <sound/rawmidi.h> |
31 | 31 | ||
32 | #include <linux/usb/ch9.h> | 32 | #include <linux/usb/ch9.h> |
33 | #include <linux/usb/composite.h> | ||
33 | #include <linux/usb/gadget.h> | 34 | #include <linux/usb/gadget.h> |
34 | #include <linux/usb/audio.h> | 35 | #include <linux/usb/audio.h> |
35 | #include <linux/usb/midi.h> | 36 | #include <linux/usb/midi.h> |
36 | 37 | ||
37 | #include "gadget_chips.h" | 38 | #include "gadget_chips.h" |
38 | 39 | ||
39 | #include "composite.c" | ||
40 | #include "f_midi.c" | 40 | #include "f_midi.c" |
41 | 41 | ||
42 | /*-------------------------------------------------------------------------*/ | 42 | /*-------------------------------------------------------------------------*/ |
diff --git a/drivers/usb/gadget/hid.c b/drivers/usb/gadget/hid.c index 0e2e357cc59e..5fa1bfa8c6c6 100644 --- a/drivers/usb/gadget/hid.c +++ b/drivers/usb/gadget/hid.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/module.h> | ||
19 | #include <linux/usb/composite.h> | ||
18 | 20 | ||
19 | #include "gadget_chips.h" | 21 | #include "gadget_chips.h" |
20 | #define DRIVER_DESC "HID Gadget" | 22 | #define DRIVER_DESC "HID Gadget" |
@@ -34,9 +36,6 @@ | |||
34 | * the runtime footprint, and giving us at least some parts of what | 36 | * the runtime footprint, and giving us at least some parts of what |
35 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. | 37 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. |
36 | */ | 38 | */ |
37 | |||
38 | #include "composite.c" | ||
39 | |||
40 | #include "f_hid.c" | 39 | #include "f_hid.c" |
41 | 40 | ||
42 | 41 | ||
diff --git a/drivers/usb/gadget/mass_storage.c b/drivers/usb/gadget/mass_storage.c index 9eb2be685803..080e577773d5 100644 --- a/drivers/usb/gadget/mass_storage.c +++ b/drivers/usb/gadget/mass_storage.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/usb/ch9.h> | 32 | #include <linux/usb/ch9.h> |
33 | #include <linux/module.h> | ||
33 | 34 | ||
34 | /*-------------------------------------------------------------------------*/ | 35 | /*-------------------------------------------------------------------------*/ |
35 | 36 | ||
@@ -45,8 +46,6 @@ | |||
45 | * the runtime footprint, and giving us at least some parts of what | 46 | * the runtime footprint, and giving us at least some parts of what |
46 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. | 47 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. |
47 | */ | 48 | */ |
48 | |||
49 | #include "composite.c" | ||
50 | #include "f_mass_storage.c" | 49 | #include "f_mass_storage.c" |
51 | 50 | ||
52 | /*-------------------------------------------------------------------------*/ | 51 | /*-------------------------------------------------------------------------*/ |
diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index 5bc5d96beaac..9d2e75c017dc 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c | |||
@@ -40,9 +40,6 @@ MODULE_LICENSE("GPL"); | |||
40 | * the runtime footprint, and giving us at least some parts of what | 40 | * the runtime footprint, and giving us at least some parts of what |
41 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. | 41 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. |
42 | */ | 42 | */ |
43 | |||
44 | #include "composite.c" | ||
45 | |||
46 | #include "f_mass_storage.c" | 43 | #include "f_mass_storage.c" |
47 | 44 | ||
48 | #include "u_serial.c" | 45 | #include "u_serial.c" |
diff --git a/drivers/usb/gadget/ncm.c b/drivers/usb/gadget/ncm.c index 343f3d364ef8..b21ec269b8f5 100644 --- a/drivers/usb/gadget/ncm.c +++ b/drivers/usb/gadget/ncm.c | |||
@@ -20,6 +20,8 @@ | |||
20 | /* #define VERBOSE_DEBUG */ | 20 | /* #define VERBOSE_DEBUG */ |
21 | 21 | ||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/module.h> | ||
24 | #include <linux/usb/composite.h> | ||
23 | 25 | ||
24 | #include "u_ether.h" | 26 | #include "u_ether.h" |
25 | 27 | ||
@@ -34,8 +36,6 @@ | |||
34 | * the runtime footprint, and giving us at least some parts of what | 36 | * the runtime footprint, and giving us at least some parts of what |
35 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. | 37 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. |
36 | */ | 38 | */ |
37 | #include "composite.c" | ||
38 | |||
39 | #include "f_ncm.c" | 39 | #include "f_ncm.c" |
40 | #include "u_ether.c" | 40 | #include "u_ether.c" |
41 | 41 | ||
diff --git a/drivers/usb/gadget/nokia.c b/drivers/usb/gadget/nokia.c index 465766e41442..ad0cc3473073 100644 --- a/drivers/usb/gadget/nokia.c +++ b/drivers/usb/gadget/nokia.c | |||
@@ -37,8 +37,6 @@ | |||
37 | * the runtime footprint, and giving us at least some parts of what | 37 | * the runtime footprint, and giving us at least some parts of what |
38 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. | 38 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. |
39 | */ | 39 | */ |
40 | #include "composite.c" | ||
41 | |||
42 | #include "u_serial.c" | 40 | #include "u_serial.c" |
43 | #include "f_acm.c" | 41 | #include "f_acm.c" |
44 | #include "f_ecm.c" | 42 | #include "f_ecm.c" |
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 9bd994203d3d..e394050afd02 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
@@ -37,22 +37,12 @@ | |||
37 | #include <asm/unaligned.h> | 37 | #include <asm/unaligned.h> |
38 | 38 | ||
39 | #include <linux/usb/ch9.h> | 39 | #include <linux/usb/ch9.h> |
40 | #include <linux/usb/composite.h> | ||
40 | #include <linux/usb/gadget.h> | 41 | #include <linux/usb/gadget.h> |
41 | #include <linux/usb/g_printer.h> | 42 | #include <linux/usb/g_printer.h> |
42 | 43 | ||
43 | #include "gadget_chips.h" | 44 | #include "gadget_chips.h" |
44 | 45 | ||
45 | |||
46 | /* | ||
47 | * Kbuild is not very cooperative with respect to linking separately | ||
48 | * compiled library objects into one module. So for now we won't use | ||
49 | * separate compilation ... ensuring init/exit sections work to shrink | ||
50 | * the runtime footprint, and giving us at least some parts of what | ||
51 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. | ||
52 | */ | ||
53 | #include "composite.c" | ||
54 | |||
55 | /*-------------------------------------------------------------------------*/ | ||
56 | USB_GADGET_COMPOSITE_OPTIONS(); | 46 | USB_GADGET_COMPOSITE_OPTIONS(); |
57 | 47 | ||
58 | #define DRIVER_DESC "Printer Gadget" | 48 | #define DRIVER_DESC "Printer Gadget" |
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index bf12d55cd07b..f17d4626af55 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c | |||
@@ -36,8 +36,6 @@ | |||
36 | * the runtime footprint, and giving us at least some parts of what | 36 | * the runtime footprint, and giving us at least some parts of what |
37 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. | 37 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. |
38 | */ | 38 | */ |
39 | #include "composite.c" | ||
40 | |||
41 | #include "f_acm.c" | 39 | #include "f_acm.c" |
42 | #include "f_obex.c" | 40 | #include "f_obex.c" |
43 | #include "f_serial.c" | 41 | #include "f_serial.c" |
diff --git a/drivers/usb/gadget/tcm_usb_gadget.c b/drivers/usb/gadget/tcm_usb_gadget.c index b56d57d59796..eaa1005377fc 100644 --- a/drivers/usb/gadget/tcm_usb_gadget.c +++ b/drivers/usb/gadget/tcm_usb_gadget.c | |||
@@ -25,8 +25,6 @@ | |||
25 | #include <target/configfs_macros.h> | 25 | #include <target/configfs_macros.h> |
26 | #include <asm/unaligned.h> | 26 | #include <asm/unaligned.h> |
27 | 27 | ||
28 | #include "composite.c" | ||
29 | |||
30 | #include "tcm_usb_gadget.h" | 28 | #include "tcm_usb_gadget.h" |
31 | 29 | ||
32 | USB_GADGET_COMPOSITE_OPTIONS(); | 30 | USB_GADGET_COMPOSITE_OPTIONS(); |
diff --git a/drivers/usb/gadget/webcam.c b/drivers/usb/gadget/webcam.c index 03591194b17a..69cf5c2cd335 100644 --- a/drivers/usb/gadget/webcam.c +++ b/drivers/usb/gadget/webcam.c | |||
@@ -23,8 +23,6 @@ | |||
23 | * the runtime footprint, and giving us at least some parts of what | 23 | * the runtime footprint, and giving us at least some parts of what |
24 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. | 24 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. |
25 | */ | 25 | */ |
26 | #include "composite.c" | ||
27 | |||
28 | #include "uvc_queue.c" | 26 | #include "uvc_queue.c" |
29 | #include "uvc_video.c" | 27 | #include "uvc_video.c" |
30 | #include "uvc_v4l2.c" | 28 | #include "uvc_v4l2.c" |
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index a837f3af2047..0dabffa5f493 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c | |||
@@ -57,8 +57,6 @@ | |||
57 | * the runtime footprint, and giving us at least some parts of what | 57 | * the runtime footprint, and giving us at least some parts of what |
58 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. | 58 | * a "gcc --combine ... part1.c part2.c part3.c ... " build would. |
59 | */ | 59 | */ |
60 | #include "composite.c" | ||
61 | |||
62 | #include "f_sourcesink.c" | 60 | #include "f_sourcesink.c" |
63 | #include "f_loopback.c" | 61 | #include "f_loopback.c" |
64 | 62 | ||