From 604af2144d9109f96fa51b0535a0b1674f650e66 Mon Sep 17 00:00:00 2001 From: hselasky <hselasky@FreeBSD.org> Date: Wed, 23 Mar 2011 19:41:44 +0000 Subject: Comply with style(9). Reported by: gavin MFC after: 14 days Approved by: thompsa (mentor) --- sys/dev/usb/controller/ehci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/dev/usb/controller/ehci.c') diff --git a/sys/dev/usb/controller/ehci.c b/sys/dev/usb/controller/ehci.c index 812e422..9d73d4a 100644 --- a/sys/dev/usb/controller/ehci.c +++ b/sys/dev/usb/controller/ehci.c @@ -1183,18 +1183,18 @@ _ehci_remove_qh(ehci_qh_t *sqh, ehci_qh_t *last) static void ehci_data_toggle_update(struct usb_xfer *xfer, uint16_t actlen, uint16_t xlen) { - uint8_t full = (actlen == xlen); + uint16_t rem; uint8_t dt; /* count number of full packets */ dt = (actlen / xfer->max_packet_size) & 1; /* cumpute remainder */ - actlen = actlen % xfer->max_packet_size; + rem = actlen % xfer->max_packet_size; - if (actlen > 0) + if (rem > 0) dt ^= 1; /* short packet at the end */ - else if (!full) + else if (actlen != xlen) dt ^= 1; /* zero length packet at the end */ xfer->endpoint->toggle_next ^= dt; -- cgit v1.1