PERFORCE change 129494 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Sun Nov 25 02:59:25 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=129494
Change 129494 by hselasky at hselasky_laptop001 on 2007/11/25 10:58:43
Style change. Result from running "usb_style.sh".
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#50 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#50 (text+ko) ====
@@ -1628,53 +1628,53 @@
if (!xfer->flags_int.open) {
return;
}
- /*
- * close transfer
- */
- mtx_lock(xfer->usb_mtx);
+ /*
+ * close transfer
+ */
+ mtx_lock(xfer->usb_mtx);
- /*
- * NOTE: we need to exclude the
- * host controller driver from
- * reading "flags_int" when we
- * clear "flags_int.open" !
- */
- xfer->flags_int.open = 0;
+ /*
+ * NOTE: we need to exclude the
+ * host controller driver from
+ * reading "flags_int" when we
+ * clear "flags_int.open" !
+ */
+ xfer->flags_int.open = 0;
- (xfer->pipe->methods->close) (xfer);
+ (xfer->pipe->methods->close) (xfer);
- /*
- * By clearing the "usb_thread" variable we are signalling
- * that a different thread has handled the callback. This
- * prevents other threads that are about to call the
- * callback, to actually call the callback.
- */
- xfer->usb_thread = NULL;
- mtx_unlock(xfer->usb_mtx);
+ /*
+ * By clearing the "usb_thread" variable we are signalling
+ * that a different thread has handled the callback. This
+ * prevents other threads that are about to call the
+ * callback, to actually call the callback.
+ */
+ xfer->usb_thread = NULL;
+ mtx_unlock(xfer->usb_mtx);
- /* always set error */
- xfer->error = USBD_CANCELLED;
+ /* always set error */
+ xfer->error = USBD_CANCELLED;
- state = xfer->flags_int.bdma_state;
+ state = xfer->flags_int.bdma_state;
+ /*
+ * Update BUS-DMA state to cancelling, if needed
+ */
+ if ((state == USBD_BDMA_ST_LOADING) ||
+ (state == USBD_BDMA_ST_CANCEL_AND_LOAD)) {
+ xfer->flags_int.bdma_state = USBD_BDMA_ST_CANCELLING;
+ }
+ /*
+ * Check if we are doing a transfer and if so
+ * do a Cancel Callback
+ */
+ if (xfer->flags_int.transferring) {
/*
- * Update BUS-DMA state to cancelling, if needed
+ * call callback, which will clear
+ * "flags_int.transferring"
*/
- if ((state == USBD_BDMA_ST_LOADING) ||
- (state == USBD_BDMA_ST_CANCEL_AND_LOAD)) {
- xfer->flags_int.bdma_state = USBD_BDMA_ST_CANCELLING;
- }
- /*
- * Check if we are doing a transfer and if so
- * do a Cancel Callback
- */
- if (xfer->flags_int.transferring) {
- /*
- * call callback, which will clear
- * "flags_int.transferring"
- */
- usbd_callback_wrapper(xfer);
- }
+ usbd_callback_wrapper(xfer);
+ }
return;
}
More information about the p4-projects
mailing list