aboutsummaryrefslogtreecommitdiffstats
path: root/usb
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2008-08-14 09:10:34 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-08-14 09:10:34 -0700
commit89d969f7f16bac2e61e4f9546a844840d6b9ef1d (patch)
tree9ef3c67977930b5e4573ef2e3fbb5a0d4b859887 /usb
parente49ce8dee209a7d8fecb877a9e9be9fe160673f7 (diff)
downloadpatches-89d969f7f16bac2e61e4f9546a844840d6b9ef1d.tar.gz
usb gadget patches moved to driver-core due to need for dynamic_debug patch to build properly
Diffstat (limited to 'usb')
-rw-r--r--usb/usb-gadget-make-gadget_core.ko.patch188
-rw-r--r--usb/usb-gadget-move-f_acm.c-and-u_serial.c-gadget_acm_core.ko.patch110
-rw-r--r--usb/usb-gadget-move-f_ecm.c-to-gadget_ecm_core.ko.patch82
-rw-r--r--usb/usb-gadget-move-u_ether.c-to-gadget_ether_core.ko.patch98
4 files changed, 0 insertions, 478 deletions
diff --git a/usb/usb-gadget-make-gadget_core.ko.patch b/usb/usb-gadget-make-gadget_core.ko.patch
deleted file mode 100644
index 635048719b2231..00000000000000
--- a/usb/usb-gadget-make-gadget_core.ko.patch
+++ /dev/null
@@ -1,188 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Wed, 13 Aug 2008 20:08:35 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: USB gadget: make gadget_core.ko
-
-This moves the "C_UTILS" files in the USB gadget subsystem into a common
-kernel module. This solves a number of kernel build issues (same .o
-file being included into multiple .ko, etc.)
-
-Cc: David Brownell <david-b@pacbell.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/gadget/Makefile | 34 +++++++++++++++++-----------------
- drivers/usb/gadget/composite.c | 20 ++++++++++++++++++++
- drivers/usb/gadget/config.c | 5 ++++-
- drivers/usb/gadget/epautoconf.c | 2 ++
- drivers/usb/gadget/usbstring.c | 2 +-
- 5 files changed, 44 insertions(+), 19 deletions(-)
-
---- a/drivers/usb/gadget/composite.c
-+++ b/drivers/usb/gadget/composite.c
-@@ -126,6 +126,7 @@ done:
- function->name, function, value);
- return value;
- }
-+EXPORT_SYMBOL_GPL(usb_add_function);
-
- /**
- * usb_interface_id() - allocate an unused interface ID
-@@ -162,6 +163,7 @@ int __init usb_interface_id(struct usb_c
- }
- return -ENODEV;
- }
-+EXPORT_SYMBOL_GPL(usb_interface_id);
-
- static int config_buf(struct usb_configuration *config,
- enum usb_device_speed speed, void *buf, u8 type)
-@@ -452,6 +454,7 @@ done:
- config->bConfigurationValue, status);
- return status;
- }
-+EXPORT_SYMBOL_GPL(usb_add_config);
-
- /*-------------------------------------------------------------------------*/
-
-@@ -594,6 +597,7 @@ int __init usb_string_id(struct usb_comp
- }
- return -ENODEV;
- }
-+EXPORT_SYMBOL_GPL(usb_string_id);
-
- /*-------------------------------------------------------------------------*/
-
-@@ -1025,6 +1029,7 @@ int __init usb_composite_register(struct
-
- return usb_gadget_register_driver(&composite_driver);
- }
-+EXPORT_SYMBOL_GPL(usb_composite_register);
-
- /**
- * usb_composite_unregister() - unregister a composite driver
-@@ -1039,3 +1044,18 @@ void __exit usb_composite_unregister(str
- return;
- usb_gadget_unregister_driver(&composite_driver);
- }
-+EXPORT_SYMBOL_GPL(usb_composite_unregister);
-+
-+static int __init composite_init(void)
-+{
-+ return 0;
-+}
-+
-+static void __exit composite_exit(void)
-+{
-+}
-+
-+module_init(composite_init);
-+module_exit(composite_exit);
-+
-+MODULE_LICENSE("GPL");
---- a/drivers/usb/gadget/config.c
-+++ b/drivers/usb/gadget/config.c
-@@ -61,7 +61,7 @@ usb_descriptor_fillbuf(void *buf, unsign
- }
- return dest - (u8 *)buf;
- }
--
-+EXPORT_SYMBOL_GPL(usb_descriptor_fillbuf);
-
- /**
- * usb_gadget_config_buf - builts a complete configuration descriptor
-@@ -114,6 +114,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
-@@ -163,6 +164,7 @@ usb_copy_descriptors(struct usb_descript
-
- return ret;
- }
-+EXPORT_SYMBOL_GPL(usb_copy_descriptors);
-
- /**
- * usb_find_endpoint - find a copy of an endpoint descriptor
-@@ -189,3 +191,4 @@ usb_find_endpoint(
- }
- return NULL;
- }
-+EXPORT_SYMBOL_GPL(usb_find_endpoint);
---- a/drivers/usb/gadget/epautoconf.c
-+++ b/drivers/usb/gadget/epautoconf.c
-@@ -286,6 +286,7 @@ struct usb_ep * __init usb_ep_autoconfig
- /* Fail */
- return NULL;
- }
-+EXPORT_SYMBOL_GPL(usb_ep_autoconfig);
-
- /**
- * usb_ep_autoconfig_reset - reset endpoint autoconfig state
-@@ -308,4 +309,5 @@ void __init usb_ep_autoconfig_reset (str
- #endif
- epnum = 0;
- }
-+EXPORT_SYMBOL_GPL(usb_ep_autoconfig_reset);
-
---- a/drivers/usb/gadget/Makefile
-+++ b/drivers/usb/gadget/Makefile
-@@ -22,30 +22,30 @@ obj-$(CONFIG_USB_M66592) += m66592-udc.o
- #
- # USB gadget drivers
- #
--C_UTILS = composite.o usbstring.o config.o epautoconf.o
-
--g_zero-objs := zero.o f_sourcesink.o f_loopback.o $(C_UTILS)
--g_ether-objs := ether.o u_ether.o f_subset.o f_ecm.o $(C_UTILS)
--g_serial-objs := serial.o u_serial.o f_acm.o f_serial.o $(C_UTILS)
--g_midi-objs := gmidi.o usbstring.o config.o epautoconf.o
--gadgetfs-objs := inode.o
--g_file_storage-objs := file_storage.o usbstring.o config.o \
-- epautoconf.o
--g_printer-objs := printer.o usbstring.o config.o \
-+gadget_core-objs := composite.o usbstring.o config.o \
- epautoconf.o
-+
-+g_zero-objs := zero.o f_sourcesink.o f_loopback.o
-+g_ether-objs := ether.o u_ether.o f_subset.o f_ecm.o
-+g_serial-objs := serial.o u_serial.o f_acm.o f_serial.o
-+g_midi-objs := gmidi.o
-+gadgetfs-objs := inode.o
-+g_file_storage-objs := file_storage.o
-+g_printer-objs := printer.o
- g_cdc-objs := cdc2.o u_ether.o f_ecm.o \
-- u_serial.o f_acm.o $(C_UTILS)
-+ u_serial.o f_acm.o
-
- ifeq ($(CONFIG_USB_ETH_RNDIS),y)
- g_ether-objs += f_rndis.o rndis.o
- endif
-
--obj-$(CONFIG_USB_ZERO) += g_zero.o
--obj-$(CONFIG_USB_ETH) += g_ether.o
-+obj-$(CONFIG_USB_ZERO) += g_zero.o gadget_core.o
-+obj-$(CONFIG_USB_ETH) += g_ether.o gadget_core.o
- obj-$(CONFIG_USB_GADGETFS) += gadgetfs.o
--obj-$(CONFIG_USB_FILE_STORAGE) += g_file_storage.o
--obj-$(CONFIG_USB_G_SERIAL) += g_serial.o
--obj-$(CONFIG_USB_G_PRINTER) += g_printer.o
--obj-$(CONFIG_USB_MIDI_GADGET) += g_midi.o
--obj-$(CONFIG_USB_CDC_COMPOSITE) += g_cdc.o
-+obj-$(CONFIG_USB_FILE_STORAGE) += g_file_storage.o gadget_core.o
-+obj-$(CONFIG_USB_G_SERIAL) += g_serial.o gadget_core.o
-+obj-$(CONFIG_USB_G_PRINTER) += g_printer.o gadget_core.o
-+obj-$(CONFIG_USB_MIDI_GADGET) += g_midi.o gadget_core.o
-+obj-$(CONFIG_USB_CDC_COMPOSITE) += g_cdc.o gadget_core.o
-
---- a/drivers/usb/gadget/usbstring.c
-+++ b/drivers/usb/gadget/usbstring.c
-@@ -133,4 +133,4 @@ usb_gadget_get_string (struct usb_gadget
- buf [1] = USB_DT_STRING;
- return buf [0];
- }
--
-+EXPORT_SYMBOL_GPL(usb_gadget_get_string);
diff --git a/usb/usb-gadget-move-f_acm.c-and-u_serial.c-gadget_acm_core.ko.patch b/usb/usb-gadget-move-f_acm.c-and-u_serial.c-gadget_acm_core.ko.patch
deleted file mode 100644
index efffa1fd272fd7..00000000000000
--- a/usb/usb-gadget-move-f_acm.c-and-u_serial.c-gadget_acm_core.ko.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Wed, 13 Aug 2008 20:08:35 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: USB gadget: move f_acm.c and u_serial.c gadget_acm_core.ko
-
-As f_ecm.c and u_serial.c are included in multiple .ko files, move them
-into a standalone gadget_acm_core.ko
-
-Cc: David Brownell <david-b@pacbell.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/gadget/Makefile | 9 +++++----
- drivers/usb/gadget/f_acm.c | 16 ++++++++++++++++
- drivers/usb/gadget/u_serial.c | 4 ++++
- 3 files changed, 25 insertions(+), 4 deletions(-)
-
---- a/drivers/usb/gadget/f_acm.c
-+++ b/drivers/usb/gadget/f_acm.c
-@@ -661,6 +661,7 @@ fail:
-
- return status;
- }
-+EXPORT_SYMBOL_GPL(acm_bind);
-
- static void
- acm_unbind(struct usb_configuration *c, struct usb_function *f)
-@@ -757,3 +758,18 @@ int __init acm_bind_config(struct usb_co
- kfree(acm);
- return status;
- }
-+EXPORT_SYMBOL_GPL(acm_bind_config);
-+
-+static int __init acm_init(void)
-+{
-+ return 0;
-+}
-+
-+static void __exit acm_exit(void)
-+{
-+}
-+
-+module_init(acm_init);
-+module_exit(acm_exit);
-+
-+MODULE_LICENSE("GPL");
---- a/drivers/usb/gadget/Makefile
-+++ b/drivers/usb/gadget/Makefile
-@@ -27,15 +27,16 @@ gadget_core-objs := composite.o usbstri
- epautoconf.o
- gadget_ether_core-objs := u_ether.o
- gadget_ecm_core-objs := f_ecm.o
-+gadget_acm_core-objs := f_acm.o u_serial.o
-
- g_zero-objs := zero.o f_sourcesink.o f_loopback.o
- g_ether-objs := ether.o f_subset.o
--g_serial-objs := serial.o u_serial.o f_acm.o f_serial.o
-+g_serial-objs := serial.o f_serial.o
- g_midi-objs := gmidi.o
- gadgetfs-objs := inode.o
- g_file_storage-objs := file_storage.o
- g_printer-objs := printer.o
--g_cdc-objs := cdc2.o u_serial.o f_acm.o
-+g_cdc-objs := cdc2.o
-
- ifeq ($(CONFIG_USB_ETH_RNDIS),y)
- g_ether-objs += f_rndis.o rndis.o
-@@ -46,8 +47,8 @@ obj-$(CONFIG_USB_ETH) += g_ether.o gadg
- gadget_ecm_core.o
- obj-$(CONFIG_USB_GADGETFS) += gadgetfs.o
- obj-$(CONFIG_USB_FILE_STORAGE) += g_file_storage.o gadget_core.o
--obj-$(CONFIG_USB_G_SERIAL) += g_serial.o gadget_core.o
-+obj-$(CONFIG_USB_G_SERIAL) += g_serial.o gadget_core.o gadget_acm_core.o
- obj-$(CONFIG_USB_G_PRINTER) += g_printer.o gadget_core.o
- obj-$(CONFIG_USB_MIDI_GADGET) += g_midi.o gadget_core.o
- obj-$(CONFIG_USB_CDC_COMPOSITE) += g_cdc.o gadget_core.o gadget_ether_core.o \
-- gadget_ether_core.o
-+ gadget_ether_core.o gadget_acm_core.o
---- a/drivers/usb/gadget/u_serial.c
-+++ b/drivers/usb/gadget/u_serial.c
-@@ -1140,6 +1140,7 @@ fail:
- gs_tty_driver = NULL;
- return status;
- }
-+EXPORT_SYMBOL_GPL(gserial_setup);
-
- static int gs_closed(struct gs_port *port)
- {
-@@ -1198,6 +1199,7 @@ void gserial_cleanup(void)
-
- pr_debug("%s: cleaned up ttyGS* support\n", __func__);
- }
-+EXPORT_SYMBOL_GPL(gserial_cleanup);
-
- /**
- * gserial_connect - notify TTY I/O glue that USB link is active
-@@ -1277,6 +1279,7 @@ fail_out:
- gser->in->driver_data = NULL;
- return status;
- }
-+EXPORT_SYMBOL_GPL(gserial_connect);
-
- /**
- * gserial_disconnect - notify TTY I/O glue that USB link is inactive
-@@ -1328,3 +1331,4 @@ void gserial_disconnect(struct gserial *
- gs_free_requests(gser->in, &port->write_pool);
- spin_unlock_irqrestore(&port->port_lock, flags);
- }
-+EXPORT_SYMBOL_GPL(gserial_disconnect);
diff --git a/usb/usb-gadget-move-f_ecm.c-to-gadget_ecm_core.ko.patch b/usb/usb-gadget-move-f_ecm.c-to-gadget_ecm_core.ko.patch
deleted file mode 100644
index d0966c2aede812..00000000000000
--- a/usb/usb-gadget-move-f_ecm.c-to-gadget_ecm_core.ko.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Wed, 13 Aug 2008 20:08:35 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: USB gadget: move f_ecm.c to gadget_ecm_core.ko
-
-As f_ecm.c is included in multiple .ko files, move it into a
-standalone gadget_ecm_core.ko
-
-Cc: David Brownell <david-b@pacbell.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/gadget/Makefile | 12 +++++++-----
- drivers/usb/gadget/f_ecm.c | 16 ++++++++++++++++
- 2 files changed, 23 insertions(+), 5 deletions(-)
-
---- a/drivers/usb/gadget/f_ecm.c
-+++ b/drivers/usb/gadget/f_ecm.c
-@@ -734,6 +734,7 @@ fail:
-
- return status;
- }
-+EXPORT_SYMBOL_GPL(ecm_bind);
-
- static void
- ecm_unbind(struct usb_configuration *c, struct usb_function *f)
-@@ -829,3 +830,18 @@ int __init ecm_bind_config(struct usb_co
- }
- return status;
- }
-+EXPORT_SYMBOL_GPL(ecm_bind_config);
-+
-+static int __init ecm_init(void)
-+{
-+ return 0;
-+}
-+
-+static void __exit ecm_exit(void)
-+{
-+}
-+
-+module_init(ecm_init);
-+module_exit(ecm_exit);
-+
-+MODULE_LICENSE("GPL");
---- a/drivers/usb/gadget/Makefile
-+++ b/drivers/usb/gadget/Makefile
-@@ -26,26 +26,28 @@ obj-$(CONFIG_USB_M66592) += m66592-udc.o
- gadget_core-objs := composite.o usbstring.o config.o \
- epautoconf.o
- gadget_ether_core-objs := u_ether.o
-+gadget_ecm_core-objs := f_ecm.o
-
- g_zero-objs := zero.o f_sourcesink.o f_loopback.o
--g_ether-objs := ether.o f_subset.o f_ecm.o
-+g_ether-objs := ether.o f_subset.o
- g_serial-objs := serial.o u_serial.o f_acm.o f_serial.o
- g_midi-objs := gmidi.o
- gadgetfs-objs := inode.o
- g_file_storage-objs := file_storage.o
- g_printer-objs := printer.o
--g_cdc-objs := cdc2.o f_ecm.o u_serial.o f_acm.o
-+g_cdc-objs := cdc2.o u_serial.o f_acm.o
-
- ifeq ($(CONFIG_USB_ETH_RNDIS),y)
- g_ether-objs += f_rndis.o rndis.o
- endif
-
- obj-$(CONFIG_USB_ZERO) += g_zero.o gadget_core.o
--obj-$(CONFIG_USB_ETH) += g_ether.o gadget_core.o gadget_ether_core.o
-+obj-$(CONFIG_USB_ETH) += g_ether.o gadget_core.o gadget_ether_core.o \
-+ gadget_ecm_core.o
- obj-$(CONFIG_USB_GADGETFS) += gadgetfs.o
- obj-$(CONFIG_USB_FILE_STORAGE) += g_file_storage.o gadget_core.o
- obj-$(CONFIG_USB_G_SERIAL) += g_serial.o gadget_core.o
- obj-$(CONFIG_USB_G_PRINTER) += g_printer.o gadget_core.o
- obj-$(CONFIG_USB_MIDI_GADGET) += g_midi.o gadget_core.o
--obj-$(CONFIG_USB_CDC_COMPOSITE) += g_cdc.o gadget_core.o gadget_ether_core.o
--
-+obj-$(CONFIG_USB_CDC_COMPOSITE) += g_cdc.o gadget_core.o gadget_ether_core.o \
-+ gadget_ether_core.o
diff --git a/usb/usb-gadget-move-u_ether.c-to-gadget_ether_core.ko.patch b/usb/usb-gadget-move-u_ether.c-to-gadget_ether_core.ko.patch
deleted file mode 100644
index 291f8c8ad46e60..00000000000000
--- a/usb/usb-gadget-move-u_ether.c-to-gadget_ether_core.ko.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Wed, 13 Aug 2008 20:08:35 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: USB gadget: move u_ether.c to gadget_ether_core.ko
-
-As u_ether.c is included in multiple .ko files, move it into a
-standalone gadget_ether_core.ko
-
-Cc: David Brownell <david-b@pacbell.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/gadget/Makefile | 10 +++++-----
- drivers/usb/gadget/u_ether.c | 19 ++++++++++++++++++-
- 2 files changed, 23 insertions(+), 6 deletions(-)
-
---- a/drivers/usb/gadget/Makefile
-+++ b/drivers/usb/gadget/Makefile
-@@ -25,27 +25,27 @@ obj-$(CONFIG_USB_M66592) += m66592-udc.o
-
- gadget_core-objs := composite.o usbstring.o config.o \
- epautoconf.o
-+gadget_ether_core-objs := u_ether.o
-
- g_zero-objs := zero.o f_sourcesink.o f_loopback.o
--g_ether-objs := ether.o u_ether.o f_subset.o f_ecm.o
-+g_ether-objs := ether.o f_subset.o f_ecm.o
- g_serial-objs := serial.o u_serial.o f_acm.o f_serial.o
- g_midi-objs := gmidi.o
- gadgetfs-objs := inode.o
- g_file_storage-objs := file_storage.o
- g_printer-objs := printer.o
--g_cdc-objs := cdc2.o u_ether.o f_ecm.o \
-- u_serial.o f_acm.o
-+g_cdc-objs := cdc2.o f_ecm.o u_serial.o f_acm.o
-
- ifeq ($(CONFIG_USB_ETH_RNDIS),y)
- g_ether-objs += f_rndis.o rndis.o
- endif
-
- obj-$(CONFIG_USB_ZERO) += g_zero.o gadget_core.o
--obj-$(CONFIG_USB_ETH) += g_ether.o gadget_core.o
-+obj-$(CONFIG_USB_ETH) += g_ether.o gadget_core.o gadget_ether_core.o
- obj-$(CONFIG_USB_GADGETFS) += gadgetfs.o
- obj-$(CONFIG_USB_FILE_STORAGE) += g_file_storage.o gadget_core.o
- obj-$(CONFIG_USB_G_SERIAL) += g_serial.o gadget_core.o
- obj-$(CONFIG_USB_G_PRINTER) += g_printer.o gadget_core.o
- obj-$(CONFIG_USB_MIDI_GADGET) += g_midi.o gadget_core.o
--obj-$(CONFIG_USB_CDC_COMPOSITE) += g_cdc.o gadget_core.o
-+obj-$(CONFIG_USB_CDC_COMPOSITE) += g_cdc.o gadget_core.o gadget_ether_core.o
-
---- a/drivers/usb/gadget/u_ether.c
-+++ b/drivers/usb/gadget/u_ether.c
-@@ -797,6 +797,7 @@ int __init gether_setup(struct usb_gadge
-
- return status;
- }
-+EXPORT_SYMBOL_GPL(gether_setup);
-
- /**
- * gether_cleanup - remove Ethernet-over-USB device
-@@ -817,7 +818,7 @@ void gether_cleanup(void)
-
- the_dev = NULL;
- }
--
-+EXPORT_SYMBOL_GPL(gether_cleanup);
-
- /**
- * gether_connect - notify network layer that USB link is active
-@@ -891,6 +892,7 @@ fail0:
- return ERR_PTR(result);
- return dev->net;
- }
-+EXPORT_SYMBOL_GPL(gether_connect);
-
- /**
- * gether_disconnect - notify network layer that USB link is inactive
-@@ -962,3 +964,18 @@ void gether_disconnect(struct gether *li
- link->ioport = NULL;
- spin_unlock(&dev->lock);
- }
-+EXPORT_SYMBOL_GPL(gether_disconnect);
-+
-+static int __init gether_init(void)
-+{
-+ return 0;
-+}
-+
-+static void __exit gether_exit(void)
-+{
-+}
-+
-+module_init(gether_init);
-+module_exit(gether_exit);
-+
-+MODULE_LICENSE("GPL");