ChangeSet 1.2020.1.54, 2005/03/08 00:02:54-08:00, [EMAIL PROTECTED] [PATCH] usb/message: move msecs change into usb_start_wait_urb()
After discussion with gregkh on IRC, I realized that the conversion can be pushed one layer further down into usb_start_wait_urb(), as only usb_{control,bulk}_msg() call this function (kaweth.c has its own version, which remains unchanged by this set of patches). The following incremental patch pushes the conversion into usb_start_wait_urb(). It should be applied after the previous ones to message.c [1/63 and 3/63]. Description: Pushes conversion from milliseconds to jiffies one function further down the usb stack into usb_start_wait_urb(). The only callers of this function are usb_{control,bulk}_msg(); this patch makes the units conversion happen in one place instead of two. Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> drivers/usb/core/message.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c --- a/drivers/usb/core/message.c 2005-03-08 16:50:48 -08:00 +++ b/drivers/usb/core/message.c 2005-03-08 16:50:48 -08:00 @@ -55,7 +55,7 @@ if (status == 0) { if (timeout > 0) { init_timer(&timer); - timer.expires = jiffies + timeout; + timer.expires = jiffies + msecs_to_jiffies(timeout); timer.data = (unsigned long)urb; timer.function = timeout_kill; /* grr. timeout _should_ include submit delays. */ @@ -98,7 +98,7 @@ usb_fill_control_urb(urb, usb_dev, pipe, (unsigned char *)cmd, data, len, usb_api_blocking_completion, NULL); - retv = usb_start_wait_urb(urb, msecs_to_jiffies(timeout), &length); + retv = usb_start_wait_urb(urb, timeout, &length); if (retv < 0) return retv; else @@ -196,7 +196,7 @@ usb_fill_bulk_urb(urb, usb_dev, pipe, data, len, usb_api_blocking_completion, NULL); - return usb_start_wait_urb(urb,msecs_to_jiffies(timeout),actual_length); + return usb_start_wait_urb(urb, timeout, actual_length); } /*-------------------------------------------------------------------*/ ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel