aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2006-11-06 11:56:13 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 17:23:30 -0500
commit1bb5f66bb3b6c2fd7eec1cdfee9cf3f68ef83487 (patch)
tree06051985f9e64c43a51a0d86475c4191ebe4c3fe
parentb4ee4a2309c9f811457ce44962eed753e451dc11 (diff)
USB: Move private hub declarations out of public header file
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 <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/core/hub.c42
-rw-r--r--drivers/usb/core/hub.h41
2 files changed, 42 insertions, 41 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index c91745def9e7..c961a32f3176 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -31,6 +31,48 @@
31#include "hcd.h" 31#include "hcd.h"
32#include "hub.h" 32#include "hub.h"
33 33
34struct usb_hub {
35 struct device *intfdev; /* the "interface" device */
36 struct usb_device *hdev;
37 struct urb *urb; /* for interrupt polling pipe */
38
39 /* buffer for urb ... with extra space in case of babble */
40 char (*buffer)[8];
41 dma_addr_t buffer_dma; /* DMA address for buffer */
42 union {
43 struct usb_hub_status hub;
44 struct usb_port_status port;
45 } *status; /* buffer for status reports */
46
47 int error; /* last reported error */
48 int nerrors; /* track consecutive errors */
49
50 struct list_head event_list; /* hubs w/data or errs ready */
51 unsigned long event_bits[1]; /* status change bitmask */
52 unsigned long change_bits[1]; /* ports with logical connect
53 status change */
54 unsigned long busy_bits[1]; /* ports being reset or
55 resumed */
56#if USB_MAXCHILDREN > 31 /* 8*sizeof(unsigned long) - 1 */
57#error event_bits[] is too short!
58#endif
59
60 struct usb_hub_descriptor *descriptor; /* class descriptor */
61 struct usb_tt tt; /* Transaction Translator */
62
63 unsigned mA_per_port; /* current for each child */
64
65 unsigned limited_power:1;
66 unsigned quiescing:1;
67 unsigned activating:1;
68 unsigned resume_root_hub:1;
69
70 unsigned has_indicators:1;
71 u8 indicator[USB_MAXCHILDREN];
72 struct work_struct leds;
73};
74
75
34/* Protect struct usb_device->state and ->children members 76/* Protect struct usb_device->state and ->children members
35 * Note: Both are also protected by ->dev.sem, except that ->state can 77 * Note: Both are also protected by ->dev.sem, except that ->state can
36 * change to USB_STATE_NOTATTACHED even when the semaphore isn't held. */ 78 * 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 1b05994de4dc..cf9559c6c9b6 100644
--- a/drivers/usb/core/hub.h
+++ b/drivers/usb/core/hub.h
@@ -192,45 +192,4 @@ struct usb_tt_clear {
192 192
193extern void usb_hub_tt_clear_buffer (struct usb_device *dev, int pipe); 193extern void usb_hub_tt_clear_buffer (struct usb_device *dev, int pipe);
194 194
195struct usb_hub {
196 struct device *intfdev; /* the "interface" device */
197 struct usb_device *hdev;
198 struct urb *urb; /* for interrupt polling pipe */
199
200 /* buffer for urb ... with extra space in case of babble */
201 char (*buffer)[8];
202 dma_addr_t buffer_dma; /* DMA address for buffer */
203 union {
204 struct usb_hub_status hub;
205 struct usb_port_status port;
206 } *status; /* buffer for status reports */
207
208 int error; /* last reported error */
209 int nerrors; /* track consecutive errors */
210
211 struct list_head event_list; /* hubs w/data or errs ready */
212 unsigned long event_bits[1]; /* status change bitmask */
213 unsigned long change_bits[1]; /* ports with logical connect
214 status change */
215 unsigned long busy_bits[1]; /* ports being reset or
216 resumed */
217#if USB_MAXCHILDREN > 31 /* 8*sizeof(unsigned long) - 1 */
218#error event_bits[] is too short!
219#endif
220
221 struct usb_hub_descriptor *descriptor; /* class descriptor */
222 struct usb_tt tt; /* Transaction Translator */
223
224 unsigned mA_per_port; /* current for each child */
225
226 unsigned limited_power:1;
227 unsigned quiescing:1;
228 unsigned activating:1;
229 unsigned resume_root_hub:1;
230
231 unsigned has_indicators:1;
232 u8 indicator[USB_MAXCHILDREN];
233 struct work_struct leds;
234};
235
236#endif /* __LINUX_HUB_H */ 195#endif /* __LINUX_HUB_H */