]> err.no Git - linux-2.6/blobdiff - drivers/usb/host/isp116x-hcd.c
[PATCH] USB: isp116x-hcd: use fixed power-on-to-power-good-time
[linux-2.6] / drivers / usb / host / isp116x-hcd.c
index 50b1970fe6b67468924d730f921e530b29827ad7..a7cb134cf1251a1afd046a3421d2c1422d7fb5d5 100644 (file)
@@ -229,9 +229,11 @@ static void preproc_atl_queue(struct isp116x *isp116x)
        struct isp116x_ep *ep;
        struct urb *urb;
        struct ptd *ptd;
-       u16 toggle = 0, dir = PTD_DIR_SETUP, len;
+       u16 len;
 
        for (ep = isp116x->atl_active; ep; ep = ep->active) {
+               u16 toggle = 0, dir = PTD_DIR_SETUP;
+
                BUG_ON(list_empty(&ep->hep->urb_list));
                urb = container_of(ep->hep->urb_list.next,
                                   struct urb, urb_list);
@@ -715,7 +717,7 @@ static int isp116x_urb_enqueue(struct usb_hcd *hcd,
        }
        /* avoid all allocations within spinlocks: request or endpoint */
        if (!hep->hcpriv) {
-               ep = kcalloc(1, sizeof *ep, mem_flags);
+               ep = kzalloc(sizeof *ep, mem_flags);
                if (!ep)
                        return -ENOMEM;
        }
@@ -1578,16 +1580,12 @@ static int isp116x_start(struct usb_hcd *hcd)
        isp116x_write_reg16(isp116x, HCHWCFG, val);
 
        /* ----- Root hub conf */
-       val = 0;
+       val = (25 << 24) & RH_A_POTPGT;
        /* AN10003_1.pdf recommends NPS to be always 1 */
        if (board->no_power_switching)
                val |= RH_A_NPS;
        if (board->power_switching_mode)
                val |= RH_A_PSM;
-       if (board->potpg)
-               val |= (board->potpg << 24) & RH_A_POTPGT;
-       else
-               val |= (25 << 24) & RH_A_POTPGT;
        isp116x_write_reg32(isp116x, HCRHDESCA, val);
        isp116x->rhdesca = isp116x_read_reg32(isp116x, HCRHDESCA);