aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-sched.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-07-11 11:21:25 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 16:50:13 -0700
commitc83e1a9ff68a6535b81c40dc8fda99348ab480fb (patch)
treefea3bfe22caed0144933c8b065f2bf16937fd8fb /drivers/usb/host/ehci-sched.c
parent15be105b4a18c461b95fa683907f6da6deae1b75 (diff)
downloadlinux-stericsson-c83e1a9ff68a6535b81c40dc8fda99348ab480fb.tar.gz
USB: EHCI: don't refcount QHs
This patch (as1567) removes ehci-hcd's reference counting of QH structures. It's not necessary to refcount these things because they always get deallocated at exactly one spot in ehci_endpoint_disable() (except for two special QHs, ehci->async and ehci->dummy) and are never used again. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-sched.c')
-rw-r--r--drivers/usb/host/ehci-sched.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index 33182c6d1ff9..027df3de2dc9 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -606,7 +606,6 @@ static int qh_link_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
}
qh->qh_state = QH_STATE_LINKED;
qh->xacterrs = 0;
- qh_get (qh);
/* update per-qh bandwidth for usbfs */
ehci_to_hcd(ehci)->self.bandwidth_allocated += qh->period
@@ -650,7 +649,6 @@ static int qh_unlink_periodic(struct ehci_hcd *ehci, struct ehci_qh *qh)
/* qh->qh_next still "live" to HC */
qh->qh_state = QH_STATE_UNLINK;
qh->qh_next.ptr = NULL;
- qh_put (qh);
/* maybe turn off periodic schedule */
return disable_periodic(ehci);
@@ -2340,7 +2338,7 @@ restart:
switch (hc32_to_cpu(ehci, type)) {
case Q_TYPE_QH:
/* handle any completions */
- temp.qh = qh_get (q.qh);
+ temp.qh = q.qh;
type = Q_NEXT_TYPE(ehci, q.qh->hw->hw_next);
q = q.qh->qh_next;
if (temp.qh->stamp != ehci->periodic_stamp) {
@@ -2351,7 +2349,6 @@ restart:
temp.qh->needs_rescan))
intr_deschedule(ehci, temp.qh);
}
- qh_put (temp.qh);
break;
case Q_TYPE_FSTN:
/* for "save place" FSTNs, look at QH entries