usb: host: unhide suspend/resume declarations
[deliverable/linux.git] / drivers / usb / host / ehci.h
index 484ab1a09166abf6dbeb062a868367969a7f3125..3f3b74aeca9740c67f45831762beea1d3c2d9097 100644 (file)
@@ -247,9 +247,9 @@ struct ehci_hcd {                   /* one per controller */
        /* irq statistics */
 #ifdef EHCI_STATS
        struct ehci_stats       stats;
-#      define COUNT(x) do { (x)++; } while (0)
+#      define COUNT(x) ((x)++)
 #else
-#      define COUNT(x) do {} while (0)
+#      define COUNT(x)
 #endif
 
        /* debug files */
@@ -327,7 +327,7 @@ struct ehci_qtd {
        struct list_head        qtd_list;               /* sw qtd list */
        struct urb              *urb;                   /* qtd's urb */
        size_t                  length;                 /* length of buffer */
-} __attribute__ ((aligned (32)));
+} __aligned(32);
 
 /* mask NakCnt+T in qh->hw_alt_next */
 #define QTD_MASK(ehci) cpu_to_hc32(ehci, ~0x1f)
@@ -337,7 +337,7 @@ struct ehci_qtd {
 /*-------------------------------------------------------------------------*/
 
 /* type tag from {qh,itd,sitd,fstn}->hw_next */
-#define Q_NEXT_TYPE(ehci,dma)  ((dma) & cpu_to_hc32(ehci, 3 << 1))
+#define Q_NEXT_TYPE(ehci, dma) ((dma) & cpu_to_hc32(ehci, 3 << 1))
 
 /*
  * Now the following defines are not converted using the
@@ -353,7 +353,8 @@ struct ehci_qtd {
 #define Q_TYPE_FSTN    (3 << 1)
 
 /* next async queue entry, or pointer to interrupt/periodic QH */
-#define QH_NEXT(ehci,dma)      (cpu_to_hc32(ehci, (((u32)dma)&~0x01f)|Q_TYPE_QH))
+#define QH_NEXT(ehci, dma) \
+               (cpu_to_hc32(ehci, (((u32) dma) & ~0x01f) | Q_TYPE_QH))
 
 /* for periodic/async schedules and qtd lists, mark end of list */
 #define EHCI_LIST_END(ehci)    cpu_to_hc32(ehci, 1) /* "null pointer" to hw */
@@ -410,7 +411,7 @@ struct ehci_qh_hw {
        __hc32                  hw_token;
        __hc32                  hw_buf[5];
        __hc32                  hw_buf_hi[5];
-} __attribute__ ((aligned(32)));
+} __aligned(32);
 
 struct ehci_qh {
        struct ehci_qh_hw       *hw;            /* Must come first */
@@ -544,7 +545,7 @@ struct ehci_itd {
        unsigned                frame;          /* where scheduled */
        unsigned                pg;
        unsigned                index[8];       /* in urb->iso_frame_desc */
-} __attribute__ ((aligned (32)));
+} __aligned(32);
 
 /*-------------------------------------------------------------------------*/
 
@@ -563,7 +564,7 @@ struct ehci_sitd {
        __hc32                  hw_results;             /* EHCI table 3-11 */
 #define        SITD_IOC        (1 << 31)       /* interrupt on completion */
 #define        SITD_PAGE       (1 << 30)       /* buffer 0/1 */
-#define        SITD_LENGTH(x)  (0x3ff & ((x)>>16))
+#define        SITD_LENGTH(x)  (((x) >> 16) & 0x3ff)
 #define        SITD_STS_ACTIVE (1 << 7)        /* HC may execute this */
 #define        SITD_STS_ERR    (1 << 6)        /* error from TT */
 #define        SITD_STS_DBE    (1 << 5)        /* data buffer error (in HC) */
@@ -587,7 +588,7 @@ struct ehci_sitd {
        struct list_head        sitd_list;      /* list of stream's sitds */
        unsigned                frame;
        unsigned                index;
-} __attribute__ ((aligned (32)));
+} __aligned(32);
 
 /*-------------------------------------------------------------------------*/
 
@@ -607,7 +608,7 @@ struct ehci_fstn {
        /* the rest is HCD-private */
        dma_addr_t              fstn_dma;
        union ehci_shadow       fstn_next;      /* ptr to periodic q entry */
-} __attribute__ ((aligned (32)));
+} __aligned(32);
 
 /*-------------------------------------------------------------------------*/
 
@@ -643,10 +644,10 @@ struct ehci_tt {
 /* Prepare the PORTSC wakeup flags during controller suspend/resume */
 
 #define ehci_prepare_ports_for_controller_suspend(ehci, do_wakeup)     \
-               ehci_adjust_port_wakeup_flags(ehci, true, do_wakeup);
+               ehci_adjust_port_wakeup_flags(ehci, true, do_wakeup)
 
 #define ehci_prepare_ports_for_controller_resume(ehci)                 \
-               ehci_adjust_port_wakeup_flags(ehci, false, false);
+               ehci_adjust_port_wakeup_flags(ehci, false, false)
 
 /*-------------------------------------------------------------------------*/
 
@@ -740,7 +741,7 @@ ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc)
 #endif
 
 static inline unsigned int ehci_readl(const struct ehci_hcd *ehci,
-               __u32 __iomem * regs)
+               __u32 __iomem *regs)
 {
 #ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
        return ehci_big_endian_mmio(ehci) ?
@@ -869,11 +870,6 @@ static inline u32 hc32_to_cpup(const struct ehci_hcd *ehci, const __hc32 *x)
 #define ehci_warn(ehci, fmt, args...) \
        dev_warn(ehci_to_hcd(ehci)->self.controller, fmt, ## args)
 
-
-#ifndef CONFIG_DYNAMIC_DEBUG
-#define STUB_DEBUG_FILES
-#endif
-
 /*-------------------------------------------------------------------------*/
 
 /* Declarations of things exported for use by ehci platform drivers */
@@ -892,12 +888,10 @@ extern int        ehci_handshake(struct ehci_hcd *ehci, void __iomem *ptr,
                                u32 mask, u32 done, int usec);
 extern int     ehci_reset(struct ehci_hcd *ehci);
 
-#ifdef CONFIG_PM
 extern int     ehci_suspend(struct usb_hcd *hcd, bool do_wakeup);
 extern int     ehci_resume(struct usb_hcd *hcd, bool force_reset);
 extern void    ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
                        bool suspending, bool do_wakeup);
-#endif /* CONFIG_PM */
 
 extern int     ehci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
                                 u16 wIndex, char *buf, u16 wLength);
This page took 0.026794 seconds and 5 git commands to generate.