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.

Greg, please apply.

Matt

# This is a BitKeeper generated patch for the following project:
# Project Name: greg k-h's linux 2.5 USB kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#                  ChangeSet    1.722   -> 1.723  
#       drivers/usb/storage/transport.c 1.90    -> 1.91   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/06/28      [EMAIL PROTECTED]       1.723
# Clean up some conditional logic to be a bit more readable.
# --------------------------------------------
#
diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c   Sat Jun 28 20:31:18 2003
+++ b/drivers/usb/storage/transport.c   Sat Jun 28 20:31:18 2003
@@ -154,10 +154,9 @@
         * easier than always having the caller tell us whether the
         * transfer buffer has already been mapped. */
        us->current_urb->transfer_flags =
-                       (us->current_urb->transfer_buffer == us->iobuf)
-                       ? URB_ASYNC_UNLINK | URB_NO_SETUP_DMA_MAP
-                               | URB_NO_TRANSFER_DMA_MAP
-                       : URB_ASYNC_UNLINK | URB_NO_SETUP_DMA_MAP;
+                       URB_ASYNC_UNLINK | URB_NO_SETUP_DMA_MAP;
+       if (us->current_urb->transfer_buffer == us->iobuf)
+               us->current_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
        us->current_urb->transfer_dma = us->iobuf_dma;
        us->current_urb->setup_dma = us->cr_dma;
 
-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

Hey Chief.  We've figured out how to save the technical department.  We 
need to be committed.
                                        -- The Techs
User Friendly, 1/22/1998

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to