aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci.h
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2011-11-17 16:41:56 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-18 13:51:00 -0500
commitb7463c71fbbff7111d0c879d2f64fe2b08f51848 (patch)
tree4d5b69827f602a5c590cf75d5702260fc379d6f6 /drivers/usb/host/ohci.h
parentc6249ff7521c0211e9daa37f07a4c016a5c4d454 (diff)
OHCI: remove uses of hcd->state
This patch (as1500) removes all uses of the objectionable hcd->state variable from the ohci-hcd family of drivers. It is replaced by a private ohci->rh_state field, just as in uhci-hcd and ehci-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/ohci.h')
-rw-r--r--drivers/usb/host/ohci.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index 35e5fd640ce7..3a978a2130cb 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -344,6 +344,12 @@ typedef struct urb_priv {
344 * a subset of what the full implementation needs. (Linus) 344 * a subset of what the full implementation needs. (Linus)
345 */ 345 */
346 346
347enum ohci_rh_state {
348 OHCI_RH_HALTED,
349 OHCI_RH_SUSPENDED,
350 OHCI_RH_RUNNING
351};
352
347struct ohci_hcd { 353struct ohci_hcd {
348 spinlock_t lock; 354 spinlock_t lock;
349 355
@@ -384,6 +390,7 @@ struct ohci_hcd {
384 /* 390 /*
385 * driver state 391 * driver state
386 */ 392 */
393 enum ohci_rh_state rh_state;
387 int num_ports; 394 int num_ports;
388 int load [NUM_INTS]; 395 int load [NUM_INTS];
389 u32 hc_control; /* copy of hc control reg */ 396 u32 hc_control; /* copy of hc control reg */
@@ -680,11 +687,6 @@ static inline u16 ohci_hwPSW(const struct ohci_hcd *ohci,
680 687
681/*-------------------------------------------------------------------------*/ 688/*-------------------------------------------------------------------------*/
682 689
683static inline void disable (struct ohci_hcd *ohci)
684{
685 ohci_to_hcd(ohci)->state = HC_STATE_HALT;
686}
687
688#define FI 0x2edf /* 12000 bits per frame (-1) */ 690#define FI 0x2edf /* 12000 bits per frame (-1) */
689#define FSMP(fi) (0x7fff & ((6 * ((fi) - 210)) / 7)) 691#define FSMP(fi) (0x7fff & ((6 * ((fi) - 210)) / 7))
690#define FIT (1 << 31) 692#define FIT (1 << 31)
@@ -708,7 +710,7 @@ static inline void periodic_reinit (struct ohci_hcd *ohci)
708#define read_roothub(hc, register, mask) ({ \ 710#define read_roothub(hc, register, mask) ({ \
709 u32 temp = ohci_readl (hc, &hc->regs->roothub.register); \ 711 u32 temp = ohci_readl (hc, &hc->regs->roothub.register); \
710 if (temp == -1) \ 712 if (temp == -1) \
711 disable (hc); \ 713 hc->rh_state = OHCI_RH_HALTED; \
712 else if (hc->flags & OHCI_QUIRK_AMD756) \ 714 else if (hc->flags & OHCI_QUIRK_AMD756) \
713 while (temp & mask) \ 715 while (temp & mask) \
714 temp = ohci_readl (hc, &hc->regs->roothub.register); \ 716 temp = ohci_readl (hc, &hc->regs->roothub.register); \