From: Alan Stern <[EMAIL PROTECTED]>

This patch (as809b) moves the declaration of the hub driver's private
data structure from hub.h into the hub.c source file.  Lots of other
files import hub.h; they have no need to know about the details of the
hub driver's private data.

Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/core/hub.c |   42 ++++++++++++++++++++++++++++++++++++++++++
 drivers/usb/core/hub.h |   41 -----------------------------------------
 2 files changed, 42 insertions(+), 41 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index c91745d..c961a32 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -31,6 +31,48 @@
 #include "hcd.h"
 #include "hub.h"
 
+struct usb_hub {
+       struct device           *intfdev;       /* the "interface" device */
+       struct usb_device       *hdev;
+       struct urb              *urb;           /* for interrupt polling pipe */
+
+       /* buffer for urb ... with extra space in case of babble */
+       char                    (*buffer)[8];
+       dma_addr_t              buffer_dma;     /* DMA address for buffer */
+       union {
+               struct usb_hub_status   hub;
+               struct usb_port_status  port;
+       }                       *status;        /* buffer for status reports */
+
+       int                     error;          /* last reported error */
+       int                     nerrors;        /* track consecutive errors */
+
+       struct list_head        event_list;     /* hubs w/data or errs ready */
+       unsigned long           event_bits[1];  /* status change bitmask */
+       unsigned long           change_bits[1]; /* ports with logical connect
+                                                       status change */
+       unsigned long           busy_bits[1];   /* ports being reset or
+                                                       resumed */
+#if USB_MAXCHILDREN > 31 /* 8*sizeof(unsigned long) - 1 */
+#error event_bits[] is too short!
+#endif
+
+       struct usb_hub_descriptor *descriptor;  /* class descriptor */
+       struct usb_tt           tt;             /* Transaction Translator */
+
+       unsigned                mA_per_port;    /* current for each child */
+
+       unsigned                limited_power:1;
+       unsigned                quiescing:1;
+       unsigned                activating:1;
+       unsigned                resume_root_hub:1;
+
+       unsigned                has_indicators:1;
+       u8                      indicator[USB_MAXCHILDREN];
+       struct work_struct      leds;
+};
+
+
 /* Protect struct usb_device->state and ->children members
  * Note: Both are also protected by ->dev.sem, except that ->state can
  * change to USB_STATE_NOTATTACHED even when the semaphore isn't held. */
diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
index 1b05994..cf9559c 100644
--- a/drivers/usb/core/hub.h
+++ b/drivers/usb/core/hub.h
@@ -192,45 +192,4 @@ struct usb_tt_clear {
 
 extern void usb_hub_tt_clear_buffer (struct usb_device *dev, int pipe);
 
-struct usb_hub {
-       struct device           *intfdev;       /* the "interface" device */
-       struct usb_device       *hdev;
-       struct urb              *urb;           /* for interrupt polling pipe */
-
-       /* buffer for urb ... with extra space in case of babble */
-       char                    (*buffer)[8];
-       dma_addr_t              buffer_dma;     /* DMA address for buffer */
-       union {
-               struct usb_hub_status   hub;
-               struct usb_port_status  port;
-       }                       *status;        /* buffer for status reports */
-
-       int                     error;          /* last reported error */
-       int                     nerrors;        /* track consecutive errors */
-
-       struct list_head        event_list;     /* hubs w/data or errs ready */
-       unsigned long           event_bits[1];  /* status change bitmask */
-       unsigned long           change_bits[1]; /* ports with logical connect
-                                                       status change */
-       unsigned long           busy_bits[1];   /* ports being reset or
-                                                       resumed */
-#if USB_MAXCHILDREN > 31 /* 8*sizeof(unsigned long) - 1 */
-#error event_bits[] is too short!
-#endif
-
-       struct usb_hub_descriptor *descriptor;  /* class descriptor */
-       struct usb_tt           tt;             /* Transaction Translator */
-
-       unsigned                mA_per_port;    /* current for each child */
-
-       unsigned                limited_power:1;
-       unsigned                quiescing:1;
-       unsigned                activating:1;
-       unsigned                resume_root_hub:1;
-
-       unsigned                has_indicators:1;
-       u8                      indicator[USB_MAXCHILDREN];
-       struct work_struct      leds;
-};
-
 #endif /* __LINUX_HUB_H */
-- 
1.4.4.1


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to