drivers: Final irq namespace conversion
[linux-2.6.git] / drivers / usb / host / oxu210hp-hcd.c
index 8f04c0a..44e4deb 100644 (file)
@@ -451,9 +451,9 @@ static void ehci_hub_descriptor(struct oxu_hcd *oxu,
        temp = 1 + (ports / 8);
        desc->bDescLength = 7 + 2 * temp;
 
-       /* two bitmaps:  ports removable, and usb 1.0 legacy PortPwrCtrlMask */
-       memset(&desc->bitmap[0], 0, temp);
-       memset(&desc->bitmap[temp], 0xff, temp);
+       /* ports removable, and usb 1.0 legacy PortPwrCtrlMask */
+       memset(&desc->u.hs.DeviceRemovable[0], 0, temp);
+       memset(&desc->u.hs.DeviceRemovable[temp], 0xff, temp);
 
        temp = 0x0008;                  /* per-port overcurrent reporting */
        if (HCS_PPC(oxu->hcs_params))
@@ -544,8 +544,6 @@ static void oxu_buf_free(struct oxu_hcd *oxu, struct ehci_qtd *qtd)
        qtd->buffer = NULL;
 
        spin_unlock(&oxu->mem_lock);
-
-       return;
 }
 
 static inline void ehci_qtd_init(struct ehci_qtd *qtd, dma_addr_t dma)
@@ -571,8 +569,6 @@ static inline void oxu_qtd_free(struct oxu_hcd *oxu, struct ehci_qtd *qtd)
        oxu->qtd_used[index] = 0;
 
        spin_unlock(&oxu->mem_lock);
-
-       return;
 }
 
 static struct ehci_qtd *ehci_qtd_alloc(struct oxu_hcd *oxu)
@@ -615,8 +611,6 @@ static void oxu_qh_free(struct oxu_hcd *oxu, struct ehci_qh *qh)
        oxu->qh_used[index] = 0;
 
        spin_unlock(&oxu->mem_lock);
-
-       return;
 }
 
 static void qh_destroy(struct kref *kref)
@@ -693,8 +687,6 @@ static void oxu_murb_free(struct oxu_hcd *oxu, struct oxu_murb *murb)
        oxu->murb_used[index] = 0;
 
        spin_unlock(&oxu->mem_lock);
-
-       return;
 }
 
 static struct oxu_murb *oxu_murb_alloc(struct oxu_hcd *oxu)
@@ -1641,8 +1633,7 @@ static int submit_async(struct oxu_hcd    *oxu, struct urb *urb,
 #endif
 
        spin_lock_irqsave(&oxu->lock, flags);
-       if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE,
-                              &oxu_to_hcd(oxu)->flags))) {
+       if (unlikely(!HCD_HW_ACCESSIBLE(oxu_to_hcd(oxu)))) {
                rc = -ESHUTDOWN;
                goto done;
        }
@@ -2209,8 +2200,7 @@ static int intr_submit(struct oxu_hcd *oxu, struct urb *urb,
 
        spin_lock_irqsave(&oxu->lock, flags);
 
-       if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE,
-                              &oxu_to_hcd(oxu)->flags))) {
+       if (unlikely(!HCD_HW_ACCESSIBLE(oxu_to_hcd(oxu)))) {
                status = -ESHUTDOWN;
                goto done;
        }
@@ -2715,7 +2705,6 @@ static int oxu_run(struct usb_hcd *hcd)
        u32 temp, hcc_params;
 
        hcd->uses_new_polling = 1;
-       hcd->poll_rh = 0;
 
        /* EHCI spec section 4.1 */
        retval = ehci_reset(oxu);
@@ -3073,7 +3062,6 @@ nogood:
        ep->hcpriv = NULL;
 done:
        spin_unlock_irqrestore(&oxu->lock, flags);
-       return;
 }
 
 static int oxu_get_frame(struct usb_hcd *hcd)
@@ -3106,7 +3094,7 @@ static int oxu_hub_status_data(struct usb_hcd *hcd, char *buf)
 
        /* Some boards (mostly VIA?) report bogus overcurrent indications,
         * causing massive log spam unless we completely ignore them.  It
-        * may be relevant that VIA VT8235 controlers, where PORT_POWER is
+        * may be relevant that VIA VT8235 controllers, where PORT_POWER is
         * always set, seem to clear PORT_OCC and PORT_CSC when writing to
         * PORT_POWER; that's surprising, but maybe within-spec.
         */
@@ -3201,7 +3189,7 @@ static int oxu_hub_control(struct usb_hcd *hcd, u16 typeReq,
                 * Even if OWNER is set, so the port is owned by the
                 * companion controller, khubd needs to be able to clear
                 * the port-change status bits (especially
-                * USB_PORT_FEAT_C_CONNECTION).
+                * USB_PORT_STAT_C_CONNECTION).
                 */
 
                switch (wValue) {
@@ -3263,11 +3251,11 @@ static int oxu_hub_control(struct usb_hcd *hcd, u16 typeReq,
 
                /* wPortChange bits */
                if (temp & PORT_CSC)
-                       status |= 1 << USB_PORT_FEAT_C_CONNECTION;
+                       status |= USB_PORT_STAT_C_CONNECTION << 16;
                if (temp & PORT_PEC)
-                       status |= 1 << USB_PORT_FEAT_C_ENABLE;
+                       status |= USB_PORT_STAT_C_ENABLE << 16;
                if ((temp & PORT_OCC) && !ignore_oc)
-                       status |= 1 << USB_PORT_FEAT_C_OVER_CURRENT;
+                       status |= USB_PORT_STAT_C_OVERCURRENT << 16;
 
                /* whoever resumes must GetPortStatus to complete it!! */
                if (temp & PORT_RESUME) {
@@ -3285,7 +3273,7 @@ static int oxu_hub_control(struct usb_hcd *hcd, u16 typeReq,
                        /* resume completed? */
                        else if (time_after_eq(jiffies,
                                        oxu->reset_done[wIndex])) {
-                               status |= 1 << USB_PORT_FEAT_C_SUSPEND;
+                               status |= USB_PORT_STAT_C_SUSPEND << 16;
                                oxu->reset_done[wIndex] = 0;
 
                                /* stop resume signaling */
@@ -3308,7 +3296,7 @@ static int oxu_hub_control(struct usb_hcd *hcd, u16 typeReq,
                if ((temp & PORT_RESET)
                                && time_after_eq(jiffies,
                                        oxu->reset_done[wIndex])) {
-                       status |= 1 << USB_PORT_FEAT_C_RESET;
+                       status |= USB_PORT_STAT_C_RESET << 16;
                        oxu->reset_done[wIndex] = 0;
 
                        /* force reset to complete */
@@ -3347,20 +3335,20 @@ static int oxu_hub_control(struct usb_hcd *hcd, u16 typeReq,
                 */
 
                if (temp & PORT_CONNECT) {
-                       status |= 1 << USB_PORT_FEAT_CONNECTION;
+                       status |= USB_PORT_STAT_CONNECTION;
                        /* status may be from integrated TT */
                        status |= oxu_port_speed(oxu, temp);
                }
                if (temp & PORT_PE)
-                       status |= 1 << USB_PORT_FEAT_ENABLE;
+                       status |= USB_PORT_STAT_ENABLE;
                if (temp & (PORT_SUSPEND|PORT_RESUME))
-                       status |= 1 << USB_PORT_FEAT_SUSPEND;
+                       status |= USB_PORT_STAT_SUSPEND;
                if (temp & PORT_OC)
-                       status |= 1 << USB_PORT_FEAT_OVER_CURRENT;
+                       status |= USB_PORT_STAT_OVERCURRENT;
                if (temp & PORT_RESET)
-                       status |= 1 << USB_PORT_FEAT_RESET;
+                       status |= USB_PORT_STAT_RESET;
                if (temp & PORT_POWER)
-                       status |= 1 << USB_PORT_FEAT_POWER;
+                       status |= USB_PORT_STAT_POWER;
 
 #ifndef        OXU_VERBOSE_DEBUG
        if (status & ~0xffff)   /* only if wPortChange is interesting */
@@ -3699,7 +3687,7 @@ static void oxu_configuration(struct platform_device *pdev, void *base)
 static int oxu_verify_id(struct platform_device *pdev, void *base)
 {
        u32 id;
-       char *bo[] = {
+       static const char * const bo[] = {
                "reserved",
                "128-pin LQFP",
                "84-pin TFBGA",
@@ -3844,7 +3832,7 @@ static int oxu_drv_probe(struct platform_device *pdev)
                return -EBUSY;
        }
 
-       ret = set_irq_type(irq, IRQF_TRIGGER_FALLING);
+       ret = irq_set_irq_type(irq, IRQF_TRIGGER_FALLING);
        if (ret) {
                dev_err(&pdev->dev, "error setting irq type\n");
                ret = -EFAULT;