summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-sched.c
diff options
context:
space:
mode:
authorKarsten Wiese <fzu@wemgehoertderstaat.de>2007-12-30 21:55:05 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 14:35:02 -0800
commit3b6fcfd0664aeac6ae2fd1231f04b3ed24723c1e (patch)
tree91f6bf59435039eefcd4a931bed274a0b33882f1 /drivers/usb/host/ehci-sched.c
parent91bc4d31e81b15aa6e2d075307b8727041f2e2d1 (diff)
USB: ehci saves some memory in ISO transfer descriptors
In the EHCI driver, itd->usecs[8] is used in periodic_usecs(), indexed by uframe. For an ITD's unused uframes it is 0, else it contains the same value as itd->stream->usecs. To check if an ITD's uframe is used, we can instead test itd->hw_transaction[uframe]: if used, it will be nonzero no matter what endianess is used. This patch replaces those two uses, eliminates itd->usecs[], and saves eight bytes from each ITD. Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-sched.c')
-rw-r--r--drivers/usb/host/ehci-sched.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index 1c771045cca..1a94e6cec41 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -119,7 +119,8 @@ periodic_usecs (struct ehci_hcd *ehci, unsigned frame, unsigned uframe)
q = &q->fstn->fstn_next;
break;
case Q_TYPE_ITD:
- usecs += q->itd->usecs [uframe];
+ if (q->itd->hw_transaction[uframe])
+ usecs += q->itd->stream->usecs;
hw_p = &q->itd->hw_next;
q = &q->itd->itd_next;
break;
@@ -1536,7 +1537,6 @@ itd_link_urb (
uframe = next_uframe & 0x07;
frame = next_uframe >> 3;
- itd->usecs [uframe] = stream->usecs;
itd_patch(ehci, itd, iso_sched, packet, uframe);
next_uframe += stream->interval;