aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-10-13 17:08:02 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 19:47:44 -0400
commit0c0382e32d46f606951010b202382be14d180a17 (patch)
tree078327baa96637ca6d70bae3c59a16b0ff46f1f1 /drivers/usb/host
parentbb200f6eac6372839921be1fe87c1f5c292a7bd6 (diff)
[PATCH] USB: Rename hcd->hub_suspend to hcd->bus_suspend
This patch (as580) is perhaps the only result from the long discussion I had with David about his changes to the root-hub suspend/resume code. It renames the hub_suspend and hub_resume methods in struct usb_hcd to bus_suspend and bus_resume. These are more descriptive names, since the methods really do suspend or resume an entire USB bus, and less likely to be confused with the hub_suspend and hub_resume routines in hub.c. It also takes David's advice about removing the layer of bus glue, where those methods are called. And it implements a related change that David made to the other HCDs but forgot to put into dummy_hcd. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-hub.c8
-rw-r--r--drivers/usb/host/ehci-pci.c4
-rw-r--r--drivers/usb/host/isp116x-hcd.c12
-rw-r--r--drivers/usb/host/ohci-au1xxx.c4
-rw-r--r--drivers/usb/host/ohci-hub.c6
-rw-r--r--drivers/usb/host/ohci-lh7a404.c4
-rw-r--r--drivers/usb/host/ohci-omap.c4
-rw-r--r--drivers/usb/host/ohci-pci.c4
-rw-r--r--drivers/usb/host/ohci-ppc-soc.c4
-rw-r--r--drivers/usb/host/ohci-pxa27x.c4
-rw-r--r--drivers/usb/host/ohci-s3c2410.c4
-rw-r--r--drivers/usb/host/ohci-sa1111.c4
-rw-r--r--drivers/usb/host/sl811-hcd.c16
-rw-r--r--drivers/usb/host/uhci-hcd.c4
14 files changed, 41 insertions, 41 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 18d3f2270316..88cb4ada686e 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -30,7 +30,7 @@
30 30
31#ifdef CONFIG_PM 31#ifdef CONFIG_PM
32 32
33static int ehci_hub_suspend (struct usb_hcd *hcd) 33static int ehci_bus_suspend (struct usb_hcd *hcd)
34{ 34{
35 struct ehci_hcd *ehci = hcd_to_ehci (hcd); 35 struct ehci_hcd *ehci = hcd_to_ehci (hcd);
36 int port; 36 int port;
@@ -83,7 +83,7 @@ static int ehci_hub_suspend (struct usb_hcd *hcd)
83 83
84 84
85/* caller has locked the root hub, and should reset/reinit on error */ 85/* caller has locked the root hub, and should reset/reinit on error */
86static int ehci_hub_resume (struct usb_hcd *hcd) 86static int ehci_bus_resume (struct usb_hcd *hcd)
87{ 87{
88 struct ehci_hcd *ehci = hcd_to_ehci (hcd); 88 struct ehci_hcd *ehci = hcd_to_ehci (hcd);
89 u32 temp; 89 u32 temp;
@@ -159,8 +159,8 @@ static int ehci_hub_resume (struct usb_hcd *hcd)
159 159
160#else 160#else
161 161
162#define ehci_hub_suspend NULL 162#define ehci_bus_suspend NULL
163#define ehci_hub_resume NULL 163#define ehci_bus_resume NULL
164 164
165#endif /* CONFIG_PM */ 165#endif /* CONFIG_PM */
166 166
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 66ebf75b2037..8bbc8dfe19f3 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -363,8 +363,8 @@ static const struct hc_driver ehci_pci_hc_driver = {
363 */ 363 */
364 .hub_status_data = ehci_hub_status_data, 364 .hub_status_data = ehci_hub_status_data,
365 .hub_control = ehci_hub_control, 365 .hub_control = ehci_hub_control,
366 .hub_suspend = ehci_hub_suspend, 366 .bus_suspend = ehci_bus_suspend,
367 .hub_resume = ehci_hub_resume, 367 .bus_resume = ehci_bus_resume,
368}; 368};
369 369
370/*-------------------------------------------------------------------------*/ 370/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index f68220fc53fd..ddb8fc591466 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -1160,7 +1160,7 @@ static int isp116x_hub_control(struct usb_hcd *hcd,
1160 1160
1161#ifdef CONFIG_PM 1161#ifdef CONFIG_PM
1162 1162
1163static int isp116x_hub_suspend(struct usb_hcd *hcd) 1163static int isp116x_bus_suspend(struct usb_hcd *hcd)
1164{ 1164{
1165 struct isp116x *isp116x = hcd_to_isp116x(hcd); 1165 struct isp116x *isp116x = hcd_to_isp116x(hcd);
1166 unsigned long flags; 1166 unsigned long flags;
@@ -1200,7 +1200,7 @@ static int isp116x_hub_suspend(struct usb_hcd *hcd)
1200 return ret; 1200 return ret;
1201} 1201}
1202 1202
1203static int isp116x_hub_resume(struct usb_hcd *hcd) 1203static int isp116x_bus_resume(struct usb_hcd *hcd)
1204{ 1204{
1205 struct isp116x *isp116x = hcd_to_isp116x(hcd); 1205 struct isp116x *isp116x = hcd_to_isp116x(hcd);
1206 u32 val; 1206 u32 val;
@@ -1266,8 +1266,8 @@ static int isp116x_hub_resume(struct usb_hcd *hcd)
1266 1266
1267#else 1267#else
1268 1268
1269#define isp116x_hub_suspend NULL 1269#define isp116x_bus_suspend NULL
1270#define isp116x_hub_resume NULL 1270#define isp116x_bus_resume NULL
1271 1271
1272#endif 1272#endif
1273 1273
@@ -1626,8 +1626,8 @@ static struct hc_driver isp116x_hc_driver = {
1626 1626
1627 .hub_status_data = isp116x_hub_status_data, 1627 .hub_status_data = isp116x_hub_status_data,
1628 .hub_control = isp116x_hub_control, 1628 .hub_control = isp116x_hub_control,
1629 .hub_suspend = isp116x_hub_suspend, 1629 .bus_suspend = isp116x_bus_suspend,
1630 .hub_resume = isp116x_hub_resume, 1630 .bus_resume = isp116x_bus_resume,
1631}; 1631};
1632 1632
1633/*----------------------------------------------------------------*/ 1633/*----------------------------------------------------------------*/
diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c
index 550d67a554f6..ac463c493035 100644
--- a/drivers/usb/host/ohci-au1xxx.c
+++ b/drivers/usb/host/ohci-au1xxx.c
@@ -215,8 +215,8 @@ static const struct hc_driver ohci_au1xxx_hc_driver = {
215 .hub_status_data = ohci_hub_status_data, 215 .hub_status_data = ohci_hub_status_data,
216 .hub_control = ohci_hub_control, 216 .hub_control = ohci_hub_control,
217#ifdef CONFIG_PM 217#ifdef CONFIG_PM
218 .hub_suspend = ohci_hub_suspend, 218 .bus_suspend = ohci_bus_suspend,
219 .hub_resume = ohci_hub_resume, 219 .bus_resume = ohci_bus_resume,
220#endif 220#endif
221 .start_port_reset = ohci_start_port_reset, 221 .start_port_reset = ohci_start_port_reset,
222}; 222};
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 39a60e731ec2..e01e77bc324b 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -45,7 +45,7 @@ static void dl_done_list (struct ohci_hcd *, struct pt_regs *);
45static void finish_unlinks (struct ohci_hcd *, u16 , struct pt_regs *); 45static void finish_unlinks (struct ohci_hcd *, u16 , struct pt_regs *);
46static int ohci_restart (struct ohci_hcd *ohci); 46static int ohci_restart (struct ohci_hcd *ohci);
47 47
48static int ohci_hub_suspend (struct usb_hcd *hcd) 48static int ohci_bus_suspend (struct usb_hcd *hcd)
49{ 49{
50 struct ohci_hcd *ohci = hcd_to_ohci (hcd); 50 struct ohci_hcd *ohci = hcd_to_ohci (hcd);
51 int status = 0; 51 int status = 0;
@@ -135,7 +135,7 @@ static inline struct ed *find_head (struct ed *ed)
135} 135}
136 136
137/* caller has locked the root hub */ 137/* caller has locked the root hub */
138static int ohci_hub_resume (struct usb_hcd *hcd) 138static int ohci_bus_resume (struct usb_hcd *hcd)
139{ 139{
140 struct ohci_hcd *ohci = hcd_to_ohci (hcd); 140 struct ohci_hcd *ohci = hcd_to_ohci (hcd);
141 u32 temp, enables; 141 u32 temp, enables;
@@ -362,7 +362,7 @@ done:
362 && usb_trylock_device (hcd->self.root_hub) 362 && usb_trylock_device (hcd->self.root_hub)
363 ) { 363 ) {
364 ohci_vdbg (ohci, "autosuspend\n"); 364 ohci_vdbg (ohci, "autosuspend\n");
365 (void) ohci_hub_suspend (hcd); 365 (void) ohci_bus_suspend (hcd);
366 usb_unlock_device (hcd->self.root_hub); 366 usb_unlock_device (hcd->self.root_hub);
367 } 367 }
368#endif 368#endif
diff --git a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c
index 71d975ae78bd..e2ed55b69f86 100644
--- a/drivers/usb/host/ohci-lh7a404.c
+++ b/drivers/usb/host/ohci-lh7a404.c
@@ -194,8 +194,8 @@ static const struct hc_driver ohci_lh7a404_hc_driver = {
194 .hub_status_data = ohci_hub_status_data, 194 .hub_status_data = ohci_hub_status_data,
195 .hub_control = ohci_hub_control, 195 .hub_control = ohci_hub_control,
196#ifdef CONFIG_PM 196#ifdef CONFIG_PM
197 .hub_suspend = ohci_hub_suspend, 197 .bus_suspend = ohci_bus_suspend,
198 .hub_resume = ohci_hub_resume, 198 .bus_resume = ohci_bus_resume,
199#endif 199#endif
200 .start_port_reset = ohci_start_port_reset, 200 .start_port_reset = ohci_start_port_reset,
201}; 201};
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index b3498b9b965f..982cdca22516 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -421,8 +421,8 @@ static const struct hc_driver ohci_omap_hc_driver = {
421 .hub_status_data = ohci_hub_status_data, 421 .hub_status_data = ohci_hub_status_data,
422 .hub_control = ohci_hub_control, 422 .hub_control = ohci_hub_control,
423#ifdef CONFIG_PM 423#ifdef CONFIG_PM
424 .hub_suspend = ohci_hub_suspend, 424 .bus_suspend = ohci_bus_suspend,
425 .hub_resume = ohci_hub_resume, 425 .bus_resume = ohci_bus_resume,
426#endif 426#endif
427 .start_port_reset = ohci_start_port_reset, 427 .start_port_reset = ohci_start_port_reset,
428}; 428};
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
index 99a0ad41aec5..a8dde8b75691 100644
--- a/drivers/usb/host/ohci-pci.c
+++ b/drivers/usb/host/ohci-pci.c
@@ -195,8 +195,8 @@ static const struct hc_driver ohci_pci_hc_driver = {
195 .hub_status_data = ohci_hub_status_data, 195 .hub_status_data = ohci_hub_status_data,
196 .hub_control = ohci_hub_control, 196 .hub_control = ohci_hub_control,
197#ifdef CONFIG_PM 197#ifdef CONFIG_PM
198 .hub_suspend = ohci_hub_suspend, 198 .bus_suspend = ohci_bus_suspend,
199 .hub_resume = ohci_hub_resume, 199 .bus_resume = ohci_bus_resume,
200#endif 200#endif
201 .start_port_reset = ohci_start_port_reset, 201 .start_port_reset = ohci_start_port_reset,
202}; 202};
diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c
index ec20710e99fe..228845eb7eab 100644
--- a/drivers/usb/host/ohci-ppc-soc.c
+++ b/drivers/usb/host/ohci-ppc-soc.c
@@ -164,8 +164,8 @@ static const struct hc_driver ohci_ppc_soc_hc_driver = {
164 .hub_status_data = ohci_hub_status_data, 164 .hub_status_data = ohci_hub_status_data,
165 .hub_control = ohci_hub_control, 165 .hub_control = ohci_hub_control,
166#ifdef CONFIG_PM 166#ifdef CONFIG_PM
167 .hub_suspend = ohci_hub_suspend, 167 .bus_suspend = ohci_bus_suspend,
168 .hub_resume = ohci_hub_resume, 168 .bus_resume = ohci_bus_resume,
169#endif 169#endif
170 .start_port_reset = ohci_start_port_reset, 170 .start_port_reset = ohci_start_port_reset,
171}; 171};
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index 2e7b48502a3d..d287dcccd415 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -279,8 +279,8 @@ static const struct hc_driver ohci_pxa27x_hc_driver = {
279 .hub_status_data = ohci_hub_status_data, 279 .hub_status_data = ohci_hub_status_data,
280 .hub_control = ohci_hub_control, 280 .hub_control = ohci_hub_control,
281#ifdef CONFIG_PM 281#ifdef CONFIG_PM
282 .hub_suspend = ohci_hub_suspend, 282 .bus_suspend = ohci_bus_suspend,
283 .hub_resume = ohci_hub_resume, 283 .bus_resume = ohci_bus_resume,
284#endif 284#endif
285 .start_port_reset = ohci_start_port_reset, 285 .start_port_reset = ohci_start_port_reset,
286}; 286};
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c
index 922e2a6f46ef..3225d455f459 100644
--- a/drivers/usb/host/ohci-s3c2410.c
+++ b/drivers/usb/host/ohci-s3c2410.c
@@ -449,8 +449,8 @@ static const struct hc_driver ohci_s3c2410_hc_driver = {
449 .hub_status_data = ohci_s3c2410_hub_status_data, 449 .hub_status_data = ohci_s3c2410_hub_status_data,
450 .hub_control = ohci_s3c2410_hub_control, 450 .hub_control = ohci_s3c2410_hub_control,
451#ifdef CONFIG_PM 451#ifdef CONFIG_PM
452 .hub_suspend = ohci_hub_suspend, 452 .bus_suspend = ohci_bus_suspend,
453 .hub_resume = ohci_hub_resume, 453 .bus_resume = ohci_bus_resume,
454#endif 454#endif
455 .start_port_reset = ohci_start_port_reset, 455 .start_port_reset = ohci_start_port_reset,
456}; 456};
diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c
index 13324b7f9c59..fb3221ebbb29 100644
--- a/drivers/usb/host/ohci-sa1111.c
+++ b/drivers/usb/host/ohci-sa1111.c
@@ -236,8 +236,8 @@ static const struct hc_driver ohci_sa1111_hc_driver = {
236 .hub_status_data = ohci_hub_status_data, 236 .hub_status_data = ohci_hub_status_data,
237 .hub_control = ohci_hub_control, 237 .hub_control = ohci_hub_control,
238#ifdef CONFIG_PM 238#ifdef CONFIG_PM
239 .hub_suspend = ohci_hub_suspend, 239 .bus_suspend = ohci_bus_suspend,
240 .hub_resume = ohci_hub_resume, 240 .bus_resume = ohci_bus_resume,
241#endif 241#endif
242 .start_port_reset = ohci_start_port_reset, 242 .start_port_reset = ohci_start_port_reset,
243}; 243};
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index b5e7a478bc01..1e47c1f86e70 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -1363,7 +1363,7 @@ error:
1363#ifdef CONFIG_PM 1363#ifdef CONFIG_PM
1364 1364
1365static int 1365static int
1366sl811h_hub_suspend(struct usb_hcd *hcd) 1366sl811h_bus_suspend(struct usb_hcd *hcd)
1367{ 1367{
1368 // SOFs off 1368 // SOFs off
1369 DBG("%s\n", __FUNCTION__); 1369 DBG("%s\n", __FUNCTION__);
@@ -1371,7 +1371,7 @@ sl811h_hub_suspend(struct usb_hcd *hcd)
1371} 1371}
1372 1372
1373static int 1373static int
1374sl811h_hub_resume(struct usb_hcd *hcd) 1374sl811h_bus_resume(struct usb_hcd *hcd)
1375{ 1375{
1376 // SOFs on 1376 // SOFs on
1377 DBG("%s\n", __FUNCTION__); 1377 DBG("%s\n", __FUNCTION__);
@@ -1380,8 +1380,8 @@ sl811h_hub_resume(struct usb_hcd *hcd)
1380 1380
1381#else 1381#else
1382 1382
1383#define sl811h_hub_suspend NULL 1383#define sl811h_bus_suspend NULL
1384#define sl811h_hub_resume NULL 1384#define sl811h_bus_resume NULL
1385 1385
1386#endif 1386#endif
1387 1387
@@ -1623,8 +1623,8 @@ static struct hc_driver sl811h_hc_driver = {
1623 */ 1623 */
1624 .hub_status_data = sl811h_hub_status_data, 1624 .hub_status_data = sl811h_hub_status_data,
1625 .hub_control = sl811h_hub_control, 1625 .hub_control = sl811h_hub_control,
1626 .hub_suspend = sl811h_hub_suspend, 1626 .bus_suspend = sl811h_bus_suspend,
1627 .hub_resume = sl811h_hub_resume, 1627 .bus_resume = sl811h_bus_resume,
1628}; 1628};
1629 1629
1630/*-------------------------------------------------------------------------*/ 1630/*-------------------------------------------------------------------------*/
@@ -1791,7 +1791,7 @@ sl811h_suspend(struct device *dev, pm_message_t state)
1791 int retval = 0; 1791 int retval = 0;
1792 1792
1793 if (state.event == PM_EVENT_FREEZE) 1793 if (state.event == PM_EVENT_FREEZE)
1794 retval = sl811h_hub_suspend(hcd); 1794 retval = sl811h_bus_suspend(hcd);
1795 else if (state.event == PM_EVENT_SUSPEND) 1795 else if (state.event == PM_EVENT_SUSPEND)
1796 port_power(sl811, 0); 1796 port_power(sl811, 0);
1797 if (retval == 0) 1797 if (retval == 0)
@@ -1816,7 +1816,7 @@ sl811h_resume(struct device *dev)
1816 } 1816 }
1817 1817
1818 dev->power.power_state = PMSG_ON; 1818 dev->power.power_state = PMSG_ON;
1819 return sl811h_hub_resume(hcd); 1819 return sl811h_bus_resume(hcd);
1820} 1820}
1821 1821
1822#else 1822#else
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index 6df555e3d97c..72cd1576d20c 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -804,8 +804,8 @@ static const struct hc_driver uhci_driver = {
804#ifdef CONFIG_PM 804#ifdef CONFIG_PM
805 .suspend = uhci_suspend, 805 .suspend = uhci_suspend,
806 .resume = uhci_resume, 806 .resume = uhci_resume,
807 .hub_suspend = uhci_rh_suspend, 807 .bus_suspend = uhci_rh_suspend,
808 .hub_resume = uhci_rh_resume, 808 .bus_resume = uhci_rh_resume,
809#endif 809#endif
810 .stop = uhci_stop, 810 .stop = uhci_stop,
811 811