Commit e6628c81 authored by Matthew Dharm's avatar Matthew Dharm Committed by Greg Kroah-Hartman

[PATCH] USB storage: logic cleanup

This patch cleans up the logic involved in setting URB flags a bit so it's
more evident that some flags are always set and other flags are only set
under certain conditons.
parent 6bfe650b
...@@ -154,10 +154,9 @@ static int usb_stor_msg_common(struct us_data *us, int timeout) ...@@ -154,10 +154,9 @@ static int usb_stor_msg_common(struct us_data *us, int timeout)
* easier than always having the caller tell us whether the * easier than always having the caller tell us whether the
* transfer buffer has already been mapped. */ * transfer buffer has already been mapped. */
us->current_urb->transfer_flags = us->current_urb->transfer_flags =
(us->current_urb->transfer_buffer == us->iobuf) URB_ASYNC_UNLINK | URB_NO_SETUP_DMA_MAP;
? URB_ASYNC_UNLINK | URB_NO_SETUP_DMA_MAP if (us->current_urb->transfer_buffer == us->iobuf)
| URB_NO_TRANSFER_DMA_MAP us->current_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
: URB_ASYNC_UNLINK | URB_NO_SETUP_DMA_MAP;
us->current_urb->transfer_dma = us->iobuf_dma; us->current_urb->transfer_dma = us->iobuf_dma;
us->current_urb->setup_dma = us->cr_dma; us->current_urb->setup_dma = us->cr_dma;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment