}
 
 /* Test and clear port RWC bit */
-void xhci_test_and_clear_bit(struct xhci_hcd *xhci, __le32 __iomem **port_array,
-                               int port_id, u32 port_bit)
+void xhci_test_and_clear_bit(struct xhci_hcd *xhci, struct xhci_port *port,
+                            u32 port_bit)
 {
        u32 temp;
 
-       temp = readl(port_array[port_id]);
+       temp = readl(port->addr);
        if (temp & port_bit) {
                temp = xhci_port_state_to_neutral(temp);
                temp |= port_bit;
-               writel(temp, port_array[port_id]);
+               writel(temp, port->addr);
        }
 }
 
  */
 static u32 xhci_get_port_status(struct usb_hcd *hcd,
                struct xhci_bus_state *bus_state,
-               __le32 __iomem **port_array,
-               u16 wIndex, u32 raw_port_status,
+       u16 wIndex, u32 raw_port_status,
                unsigned long flags)
        __releases(&xhci->lock)
        __acquires(&xhci->lock)
 
                        set_bit(wIndex, &bus_state->rexit_ports);
 
-                       xhci_test_and_clear_bit(xhci, port_array, wIndex,
-                                               PORT_PLC);
+                       xhci_test_and_clear_bit(xhci, port, PORT_PLC);
                        xhci_set_link_state(xhci, port, XDEV_U0);
 
                        spin_unlock_irqrestore(&xhci->lock, flags);
                        break;
                }
                trace_xhci_get_port_status(wIndex, temp);
-               status = xhci_get_port_status(hcd, bus_state, port_array,
-                               wIndex, temp, flags);
+               status = xhci_get_port_status(hcd, bus_state, wIndex, temp,
+                                             flags);
                if (status == 0xffffffff)
                        goto error;
 
                for_each_set_bit(port_index, &bus_state->bus_suspended,
                                 BITS_PER_LONG) {
                        /* Clear PLC to poll it later for U0 transition */
-                       xhci_test_and_clear_bit(xhci, port_array, port_index,
+                       xhci_test_and_clear_bit(xhci, ports[port_index],
                                                PORT_PLC);
                        xhci_set_link_state(xhci, ports[port_index], XDEV_U0);
                }
                                  port_index);
                        continue;
                }
-               xhci_test_and_clear_bit(xhci, port_array, port_index, PORT_PLC);
+               xhci_test_and_clear_bit(xhci, ports[port_index], PORT_PLC);
                slot_id = xhci_find_slot_id_by_port(hcd, xhci, port_index + 1);
                if (slot_id)
                        xhci_ring_device(xhci, slot_id);
 
        int slot_id;
        unsigned int hcd_portnum;
        struct xhci_bus_state *bus_state;
-       __le32 __iomem **port_array;
        bool bogus_port_status = false;
        struct xhci_port *port;
 
 
        hcd = port->rhub->hcd;
        bus_state = &xhci->bus_state[hcd_index(hcd)];
-       if (hcd->speed >= HCD_USB3)
-               port_array = xhci->usb3_ports;
-       else
-               port_array = xhci->usb2_ports;
-
        hcd_portnum = port->hcd_portnum;
        portsc = readl(port->addr);
 
                         * device and host initiated resume.
                         */
                        bus_state->port_remote_wakeup |= 1 << hcd_portnum;
-                       xhci_test_and_clear_bit(xhci, port_array,
-                                       hcd_portnum, PORT_PLC);
+                       xhci_test_and_clear_bit(xhci, port, PORT_PLC);
                        xhci_set_link_state(xhci, port, XDEV_U0);
                        /* Need to wait until the next link state change
                         * indicates the device is actually in U0.
                        xhci_ring_device(xhci, slot_id);
                if (bus_state->port_remote_wakeup & (1 << hcd_portnum)) {
                        bus_state->port_remote_wakeup &= ~(1 << hcd_portnum);
-                       xhci_test_and_clear_bit(xhci, port_array,
-                                       hcd_portnum, PORT_PLC);
+                       xhci_test_and_clear_bit(xhci, port, PORT_PLC);
                        usb_wakeup_notification(hcd->self.root_hub,
                                        hcd_portnum + 1);
                        bogus_port_status = true;
        }
 
        if (hcd->speed < HCD_USB3)
-               xhci_test_and_clear_bit(xhci, port_array, hcd_portnum,
-                                       PORT_PLC);
+               xhci_test_and_clear_bit(xhci, port, PORT_PLC);
 
 cleanup:
        /* Update event ring dequeue pointer before dropping the lock */
 
 /* xHCI roothub code */
 void xhci_set_link_state(struct xhci_hcd *xhci, struct xhci_port *port,
                                u32 link_state);
-void xhci_test_and_clear_bit(struct xhci_hcd *xhci, __le32 __iomem **port_array,
-                               int port_id, u32 port_bit);
+void xhci_test_and_clear_bit(struct xhci_hcd *xhci, struct xhci_port *port,
+                               u32 port_bit);
 int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,
                char *buf, u16 wLength);
 int xhci_hub_status_data(struct usb_hcd *hcd, char *buf);