From: Nicholas Mc Guire Date: Fri, 6 Feb 2015 09:50:21 +0000 (-0500) Subject: USB: image: use msecs_to_jiffies for time conversion X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9751afbbb02d7a1c0f57191b8423948344a7ed86;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git USB: image: use msecs_to_jiffies for time conversion This is only an API consolidation and should make things more readable it replaces var * HZ / 1000 by msecs_to_jiffies(var). Signed-off-by: Nicholas Mc Guire Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c index a62865af53cc..5cf2633cdb04 100644 --- a/drivers/usb/image/mdc800.c +++ b/drivers/usb/image/mdc800.c @@ -347,7 +347,8 @@ static int mdc800_usb_waitForIRQ (int mode, int msec) { mdc800->camera_request_ready=1+mode; - wait_event_timeout(mdc800->irq_wait, mdc800->irq_woken, msec*HZ/1000); + wait_event_timeout(mdc800->irq_wait, mdc800->irq_woken, + msecs_to_jiffies(msec)); mdc800->irq_woken = 0; if (mdc800->camera_request_ready>0) @@ -743,8 +744,9 @@ static ssize_t mdc800_device_read (struct file *file, char __user *buf, size_t l mutex_unlock(&mdc800->io_lock); return len-left; } - wait_event_timeout(mdc800->download_wait, mdc800->downloaded, - TO_DOWNLOAD_GET_READY*HZ/1000); + wait_event_timeout(mdc800->download_wait, + mdc800->downloaded, + msecs_to_jiffies(TO_DOWNLOAD_GET_READY)); mdc800->downloaded = 0; if (mdc800->download_urb->status != 0) { @@ -867,7 +869,8 @@ static ssize_t mdc800_device_write (struct file *file, const char __user *buf, s mutex_unlock(&mdc800->io_lock); return -EIO; } - wait_event_timeout(mdc800->write_wait, mdc800->written, TO_WRITE_GET_READY*HZ/1000); + wait_event_timeout(mdc800->write_wait, mdc800->written, + msecs_to_jiffies(TO_WRITE_GET_READY)); mdc800->written = 0; if (mdc800->state == WORKING) {