USB: make hub.h, hcd.h public (drivers dependency), linux-2.6.34-rc5
Subsystems (10)
PATCH 1/2 USB: make hub.h, hcd.h public (drivers dependency), linux-2.6.34-rc5
The usbcore headers:hcd.h and hub.h are shared between usbcore, HCDs and a couple of other drivers (e.g. USBIP modules). So, it makes sense to move them into a more public location and to cleanup dependency of those modules on kernel internal headers. Both are moved into include/linux/usb/
---
drivers/staging/usbip/stub_rx.c +1 -1
@@ -21,8 +21,8 @@#include "usbip_common.h" #include "stub.h" -#include "../../usb/core/hcd.h" +#include <linux/usb/hcd.h> static int is_clear_halt_cmd (struct urb *urb) {
drivers/staging/usbip/vhci.h +1 -1
@@ -18,7 +18,7 @@*/ #include <linux/platform_device.h> -#include "../../usb/core/hcd.h" +#include <linux/usb/hcd.h> struct vhci_device {
drivers/usb/c67x00/c67x00-hcd.h +1 -1
@@ -28,7 +28,7 @@#include <linux/spinlock.h> #include <linux/list.h> #include <linux/usb.h> -#include "../core/hcd.h" +#include <linux/usb/hcd.h> #include "c67x00.h" /*
drivers/usb/core/buffer.c +1 -1
@@ -14,7 +14,7 @@#include <linux/dma-mapping.h> #include <linux/dmapool.h> #include <linux/usb.h> -#include "hcd.h" +#include <linux/usb/hcd.h> /*
drivers/usb/core/config.c +1 -1
@@ -4,9 +4,9 @@#include <linux/init.h> #include <linux/slab.h> #include <linux/device.h> +#include <linux/usb/hcd.h> #include <asm/byteorder.h> #include "usb.h" -#include "hcd.h" #define USB_MAXALTSETTING 128/* Hard limit */ #define USB_MAXENDPOINTS 30/* Hard limit */
drivers/usb/core/devices.c +1 -1
@@ -56,10 +56,10 @@#include <linux/smp_lock.h> #include <linux/usbdevice_fs.h> #include <linux/mutex.h> +#include <linux/usb/hcd.h> #include <asm/uaccess.h> #include "usb.h" -#include "hcd.h" /* Define ALLOW_SERIAL_NUMBER if you want to see the serial number of devices */ #define ALLOW_SERIAL_NUMBER
drivers/usb/core/devio.c +2 -2
@@ -49,10 +49,10 @@#include <asm/uaccess.h> #include <asm/byteorder.h> #include <linux/moduleparam.h> +#include <linux/usb/hcd.h> /* for usbcore internals */ +#include <linux/usb/hub.h> -#include "hcd.h" /* for usbcore internals */ #include "usb.h" -#include "hub.h" #define USB_MAXBUS 64#define USB_DEVICE_MAX USB_MAXBUS * 128
drivers/usb/core/driver.c +1 -2
@@ -27,10 +27,9 @@#include <linux/usb.h> #include <linux/usb/quirks.h> #include <linux/pm_runtime.h> -#include "hcd.h" +#include <linux/usb/hcd.h> #include "usb.h" -#ifdef CONFIG_HOTPLUG /*
drivers/usb/core/generic.c +1 -1
@@ -18,8 +18,8 @@*/ #include <linux/usb.h> +#include <linux/usb/hcd.h> #include "usb.h" -#include "hcd.h" static inline const char *plural (int n) {
drivers/usb/core/hcd.c +2 -3
@@ -42,11 +42,10 @@#include <linux/pm_runtime.h> #include <linux/usb.h> +#include <linux/usb/hcd.h> +#include <linux/usb/hub.h> #include "usb.h" -#include "hcd.h" -#include "hub.h" -/*-------------------------------------------------------------------------*/
drivers/usb/core/hcd.h +0 -578
578 lines not on this page · raw message
drivers/usb/core/hcd-pci.c +1 -1
@@ -21,6 +21,7 @@#include <linux/pci.h> #include <linux/pm_runtime.h> #include <linux/usb.h> +#include <linux/usb/hcd.h> #include <asm/io.h> #include <asm/irq.h>
@@ -33,7 +34,6 @@#endif #include "usb.h" -#include "hcd.h" /* PCI-based HCs are common, but plenty of non-PCI HCs are used too */
drivers/usb/core/hub.c +2 -2
@@ -23,13 +23,13 @@#include <linux/mutex.h> #include <linux/freezer.h> #include <linux/pm_runtime.h> +#include <linux/usb/hcd.h> +#include <linux/usb/hub.h> #include <asm/uaccess.h> #include <asm/byteorder.h> #include "usb.h" -#include "hcd.h" -#include "hub.h" /* if we are in debug mode, always announce new devices */ #ifdef DEBUG
drivers/usb/core/hub.h +0 -205
205 lines not on this page · raw message
drivers/usb/core/inode.c +1 -1
@@ -40,9 +40,9 @@#include <linux/notifier.h> #include <linux/seq_file.h> #include <linux/smp_lock.h> +#include <linux/usb/hcd.h> #include <asm/byteorder.h> #include "usb.h" -#include "hcd.h" #define USBFS_DEFAULT_DEVMODE (S_IWUSR | S_IRUGO)#define USBFS_DEFAULT_BUSMODE (S_IXUGO | S_IRUGO)
drivers/usb/core/message.c +1 -1
@@ -14,9 +14,9 @@#include <linux/device.h> #include <linux/scatterlist.h> #include <linux/usb/quirks.h> +#include <linux/usb/hcd.h> /* for usbcore internals */ #include <asm/byteorder.h> -#include "hcd.h" /* for usbcore internals */ #include "usb.h" static void cancel_async_set_config (struct usb_device *udev);
drivers/usb/core/urb.c +1 -1
@@ -6,7 +6,7 @@#include <linux/log2.h> #include <linux/usb.h> #include <linux/wait.h> -#include "hcd.h" +#include <linux/usb/hcd.h> #define to_urb (d) container_of(d, struct urb, kref)
drivers/usb/core/usb.c +1 -2
@@ -35,16 +35,15 @@#include <linux/mutex.h> #include <linux/workqueue.h> #include <linux/debugfs.h> +#include <linux/usb/hcd.h> #include <asm/io.h> #include <linux/scatterlist.h> #include <linux/mm.h> #include <linux/dma-mapping.h> -#include "hcd.h" #include "usb.h" -const char *usbcore_name ="usbcore" ;static int nousb;/* Disable USB when built into kernel image */
drivers/usb/gadget/dummy_hcd.c +1 -4
@@ -47,6 +47,7 @@#include <linux/platform_device.h> #include <linux/usb.h> #include <linux/usb/gadget.h> +#include <linux/usb/hcd.h> #include <asm/byteorder.h> #include <asm/io.h>
@@ -54,10 +55,6 @@#include <asm/system.h> #include <asm/unaligned.h> - -#include "../core/hcd.h" - -#define DRIVER_DESC "USB Host+Gadget Emulator"#define DRIVER_VERSION "02 May 2005"
drivers/usb/host/ehci-hcd.c +1 -2
@@ -35,8 +35,7 @@#include <linux/dma-mapping.h> #include <linux/debugfs.h> #include <linux/slab.h> - -#include "../core/hcd.h" +#include <linux/usb/hcd.h> #include <asm/byteorder.h> #include <asm/io.h>
drivers/usb/host/fhci-dbg.c +1 -1
@@ -20,7 +20,7 @@#include <linux/debugfs.h> #include <linux/seq_file.h> #include <linux/usb.h> -#include "../core/hcd.h" +#include <linux/usb/hcd.h> #include "fhci.h" void fhci_dbg_isr (struct fhci_hcd *fhci,int usb_er)
drivers/usb/host/fhci.h +1 -1
@@ -25,8 +25,8 @@#include <linux/kfifo.h> #include <linux/io.h> #include <linux/usb.h> +#include <linux/usb/hcd.h> #include <asm/qe.h> -#include "../core/hcd.h" #define USB_CLOCK 48000000
drivers/usb/host/fhci-hcd.c +1 -1
@@ -28,9 +28,9 @@#include <linux/of_platform.h> #include <linux/of_gpio.h> #include <linux/slab.h> +#include <linux/usb/hcd.h> #include <asm/qe.h> #include <asm/fsl_gtm.h> -#include "../core/hcd.h" #include "fhci.h" void fhci_start_sof_timer (struct fhci_hcd *fhci)
drivers/usb/host/fhci-hub.c +1 -1
@@ -22,9 +22,9 @@#include <linux/errno.h> #include <linux/io.h> #include <linux/usb.h> +#include <linux/usb/hcd.h> #include <linux/gpio.h> #include <asm/qe.h> -#include "../core/hcd.h" #include "fhci.h" /* virtual root hub specific descriptor */
drivers/usb/host/fhci-mem.c +1 -1
@@ -21,7 +21,7 @@#include <linux/slab.h> #include <linux/list.h> #include <linux/usb.h> -#include "../core/hcd.h" +#include <linux/usb/hcd.h> #include "fhci.h" static void init_td (struct td *td)
drivers/usb/host/fhci-q.c +1 -1
@@ -22,7 +22,7 @@#include <linux/slab.h> #include <linux/list.h> #include <linux/usb.h> -#include "../core/hcd.h" +#include <linux/usb/hcd.h> #include "fhci.h" /* maps the hardware error code to the USB error code */
drivers/usb/host/fhci-sched.c +1 -1
@@ -24,9 +24,9 @@#include <linux/interrupt.h> #include <linux/io.h> #include <linux/usb.h> +#include <linux/usb/hcd.h> #include <asm/qe.h> #include <asm/fsl_gtm.h> -#include "../core/hcd.h" #include "fhci.h" static void recycle_frame (struct fhci_usb *usb,struct packet *pkt)
drivers/usb/host/fhci-tds.c +1 -1
@@ -22,7 +22,7 @@#include <linux/list.h> #include <linux/io.h> #include <linux/usb.h> -#include "../core/hcd.h" +#include <linux/usb/hcd.h> #include "fhci.h" #define DUMMY_BD_BUFFER 0xdeadbeef
drivers/usb/host/imx21-hcd.c +1 -1
@@ -56,8 +56,8 @@#include <linux/platform_device.h> #include <linux/slab.h> #include <linux/usb.h> +#include <linux/usb/hcd.h> -#include "../core/hcd.h" #include "imx21-hcd.h" #ifdef DEBUG
drivers/usb/host/isp116x-hcd.c +1 -1
@@ -64,6 +64,7 @@#include <linux/list.h> #include <linux/slab.h> #include <linux/usb.h> +#include <linux/usb/hcd.h> #include <linux/usb/isp116x.h> #include <linux/platform_device.h>
@@ -72,7 +73,6 @@#include <asm/system.h> #include <asm/byteorder.h> -#include "../core/hcd.h" #include "isp116x.h" #define DRIVER_VERSION "03 Nov 2005"
drivers/usb/host/isp1362-hcd.c +1 -2
@@ -81,6 +81,7 @@#include <linux/pm.h> #include <linux/io.h> #include <linux/bitmap.h> +#include <linux/usb/hcd.h> #include <asm/irq.h> #include <asm/system.h>
@@ -95,11 +96,9 @@ module_param(dbg_level, int, 0);#define STUB_DEBUG_FILE #endif -#include "../core/hcd.h" #include "../core/usb.h" #include "isp1362.h" -#define DRIVER_VERSION "2005-04-04"#define DRIVER_DESC "ISP1362 USB Host Controller Driver"
drivers/usb/host/isp1760-hcd.c +1 -1
@@ -18,10 +18,10 @@#include <linux/uaccess.h> #include <linux/io.h> #include <linux/mm.h> +#include <linux/usb/hcd.h> #include <asm/unaligned.h> #include <asm/cacheflush.h> -#include "../core/hcd.h" #include "isp1760-hcd.h" static struct kmem_cache *qtd_cachep;
drivers/usb/host/isp1760-if.c +1 -1
@@ -13,8 +13,8 @@#include <linux/io.h> #include <linux/platform_device.h> #include <linux/usb/isp1760.h> +#include <linux/usb/hcd.h> -#include "../core/hcd.h" #include "isp1760-hcd.h" #ifdef CONFIG_PPC_OF
drivers/usb/host/ohci-hcd.c +1 -2
@@ -36,6 +36,7 @@#include <linux/dmapool.h> #include <linux/workqueue.h> #include <linux/debugfs.h> +#include <linux/usb/hcd.h> #include <asm/io.h> #include <asm/irq.h>
@@ -43,8 +44,6 @@#include <asm/unaligned.h> #include <asm/byteorder.h> -#include "../core/hcd.h" -#define DRIVER_AUTHOR "Roman Weissgaerber, David Brownell"#define DRIVER_DESC "USB 1.1 'Open' Host Controller (OHCI) Driver"
drivers/usb/host/oxu210hp-hcd.c +1 -2
@@ -34,12 +34,11 @@#include <linux/list.h> #include <linux/interrupt.h> #include <linux/usb.h> +#include <linux/usb/hcd.h> #include <linux/moduleparam.h> #include <linux/dma-mapping.h> #include <linux/io.h> -#include "../core/hcd.h" -#include <asm/irq.h> #include <asm/system.h> #include <asm/unaligned.h>
drivers/usb/host/r8a66597-hcd.c +1 -1
@@ -38,9 +38,9 @@#include <linux/mm.h> #include <linux/irq.h> #include <linux/slab.h> +#include <linux/usb/hcd.h> #include <asm/cacheflush.h> -#include "../core/hcd.h" #include "r8a66597.h" MODULE_DESCRIPTION ("R8A66597 USB Host Controller Driver" );
drivers/usb/host/sl811-hcd.c +1 -2
@@ -45,6 +45,7 @@#include <linux/interrupt.h> #include <linux/usb.h> #include <linux/usb/sl811.h> +#include <linux/usb/hcd.h> #include <linux/platform_device.h> #include <asm/io.h>
@@ -53,10 +54,8 @@#include <asm/byteorder.h> #include <asm/unaligned.h> -#include "../core/hcd.h" #include "sl811.h" -MODULE_DESCRIPTION ("SL811HS USB Host Controller Driver" );MODULE_LICENSE ("GPL" );MODULE_ALIAS ("platform:sl811-hcd" );
drivers/usb/host/u132-hcd.c +2 -1
@@ -49,14 +49,15 @@#include <linux/list.h> #include <linux/interrupt.h> #include <linux/usb.h> +#include <linux/usb/hcd.h> #include <linux/workqueue.h> #include <linux/platform_device.h> #include <linux/mutex.h> +#include <asm/io.h> #include <asm/irq.h> #include <asm/system.h> #include <asm/byteorder.h> -#include "../core/hcd.h" /* FIXME ohci.h is ONLY for internal use by the OHCI driver. * If you're going to try stuff like this, you need to split
drivers/usb/host/uhci-hcd.c +1 -1
@@ -38,6 +38,7 @@#include <linux/dmapool.h> #include <linux/dma-mapping.h> #include <linux/usb.h> +#include <linux/usb/hcd.h> #include <linux/bitops.h> #include <linux/dmi.h>
@@ -46,7 +47,6 @@#include <asm/irq.h> #include <asm/system.h> -#include "../core/hcd.h" #include "uhci-hcd.h" #include "pci-quirks.h"
drivers/usb/host/xhci.h +1 -1
@@ -26,8 +26,8 @@#include <linux/usb.h> #include <linux/timer.h> #include <linux/kernel.h> +#include <linux/usb/hcd.h> -#include "../core/hcd.h" /* Code sharing between pci-quirks and xhci hcd */ #include "xhci-ext-caps.h"
drivers/usb/misc/ftdi-elan.c +1 -1
@@ -73,7 +73,7 @@ static struct list_head ftdi_static_list*/ #include "usb_u132.h" #include <asm/io.h> -#include "../core/hcd.h" +#include <linux/usb/hcd.h> /* FIXME ohci.h is ONLY for internal use by the OHCI driver. * If you're going to try stuff like this, you need to split
drivers/usb/mon/mon_main.c +1 -1
@@ -9,12 +9,12 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/usb.h> +#include <linux/usb/hcd.h> #include <linux/slab.h> #include <linux/notifier.h> #include <linux/mutex.h> #include "usb_mon.h" -#include "../core/hcd.h" static void mon_stop (struct mon_bus *mbus);static void mon_dissolve (struct mon_bus *mbus,struct usb_bus *ubus);
drivers/usb/musb/musb_core.h +1 -1
@@ -69,7 +69,7 @@ struct musb_ep;#include "musb_regs.h" #include "musb_gadget.h" -#include "../core/hcd.h" +#include <linux/usb/hcd.h> #include "musb_host.h"
drivers/usb/wusbcore/wusbhc.h +1 -3
@@ -58,9 +58,7 @@#include <linux/mutex.h> #include <linux/kref.h> #include <linux/workqueue.h> -/* FIXME: Yes, I know: BAD--it's not my fault the USB HC iface is not -* public */ -#include <linux/../../drivers/usb/core/hcd.h> +#include <linux/usb/hcd.h> #include <linux/uwb.h> #include <linux/usb/wusb.h>
include/linux/usb/hcd.h +578 -0
578 lines not on this page · raw message
include/linux/usb/hub.h +205 -0
205 lines not on this page · raw message
Quoted 5 lines · Eric Lescouet
The usbcore headers:hcd.h and
hub.hare shared between usbcore, HCDs and a couple of other drivers (e.g. USBIP modules). So, it makes sense to move them into a more public location and to cleanup dependency of those modules on kernel internal headers. Both are moved intoinclude/linux/usb/
Just move one at a time. Patches should do one thing only. So this should be at least 2 patches.
And I thought you were going to rename hub.h to ch11.h instead?
thanks,
greg k-h
Quoted 11 lines · Greg KH
Quoted 5 lines · Eric Lescouet
The usbcore headers:hcd.h and
hub.hare shared between usbcore, HCDs and a couple of other drivers (e.g. USBIP modules). So, it makes sense to move them into a more public location and to cleanup dependency of those modules on kernel internal headers. Both are moved intoinclude/linux/usb/Just move one at a time. Patches should do one thing only. So this should be at least 2 patches.
And I thought you were going to rename
hub.htoch11.hinstead?
Oops, I now see patch 2 :)
Anyway, how about 3 patches here? Your last one is fine, but make the first one into 2 different ones? One that does hcd.h and then one that does hub.h.
thanks,
greg k-h
Quoted 11 lines · Greg KH
Quoted 10 lines · Greg KH
Quoted 5 lines · Eric Lescouet
The usbcore headers:hcd.h and
hub.hare shared between usbcore, HCDs and a couple of other drivers (e.g. USBIP modules). So, it makes sense to move them into a more public location and to cleanup dependency of those modules on kernel internal headers. Both are moved intoinclude/linux/usb/Just move one at a time. Patches should do one thing only. So this should be at least 2 patches.
Quoted 7 lines
Quoted 1 line
And I thought you were going to rename
hub.htoch11.hinstead?Oops, I now see patch 2 :)
Anyway, how about 3 patches here? Your last one is fine, but make the first one into 2 different ones? One that does
hcd.hand then one that doeshub.h.
Why not... ;-)
Since I'll do it again, I could use 2.6.34-rc5-git5, as per your request. I was not so sure how to get the full source for the snapshot... Should I apply 2.6.34-rc5-git5 patch onto 2.6.34-rc5 tree ?
Thanks,
Eric.
Quoted 20 lines · On Sat, 24 Apr 2010 18:18:00 +0200 Eric Lescouet wrote:
Quoted 11 lines · Greg KH
Quoted 10 lines · Greg KH
Quoted 5 lines · Eric Lescouet
The usbcore headers:hcd.h and
hub.hare shared between usbcore, HCDs and a couple of other drivers (e.g. USBIP modules). So, it makes sense to move them into a more public location and to cleanup dependency of those modules on kernel internal headers. Both are moved intoinclude/linux/usb/Just move one at a time. Patches should do one thing only. So this should be at least 2 patches.
Quoted 7 lines
Quoted 1 line
And I thought you were going to rename
hub.htoch11.hinstead?Oops, I now see patch 2 :)
Anyway, how about 3 patches here? Your last one is fine, but make the first one into 2 different ones? One that does
hcd.hand then one that doeshub.h.
Quoted 5 lines
Why not... ;-)
Since I'll do it again, I could use 2.6.34-rc5-git5, as per your request. I was not so sure how to get the full source for the snapshot... Should I apply 2.6.34-rc5-git5 patch onto 2.6.34-rc5 tree ?
Yes, that's correct.
(explained in Documentation/applying-patches.txt)
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***