]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/usb/host/ehci-q.c
USB: EHCI: bugfix: urb->hcpriv should not be NULL
[karo-tx-linux.git] / drivers / usb / host / ehci-q.c
index 4b66374bdc8e33f74e20ff7bc30b7894ab24698e..3d989028c8365e6644b86428fea2f24cfba9be6e 100644 (file)
@@ -264,15 +264,9 @@ ehci_urb_done(struct ehci_hcd *ehci, struct urb *urb, int status)
 __releases(ehci->lock)
 __acquires(ehci->lock)
 {
-       if (likely (urb->hcpriv != NULL)) {
-               struct ehci_qh  *qh = (struct ehci_qh *) urb->hcpriv;
-
-               /* S-mask in a QH means it's an interrupt urb */
-               if ((qh->hw->hw_info2 & cpu_to_hc32(ehci, QH_SMASK)) != 0) {
-
-                       /* ... update hc-wide periodic stats (for usbfs) */
-                       ehci_to_hcd(ehci)->self.bandwidth_int_reqs--;
-               }
+       if (usb_pipetype(urb->pipe) == PIPE_INTERRUPT) {
+               /* ... update hc-wide periodic stats */
+               ehci_to_hcd(ehci)->self.bandwidth_int_reqs--;
        }
 
        if (unlikely(urb->unlinked)) {