lkml.org 
[lkml]   [2013]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 4/8] media/si4713-i2c: take usecs_to_jiffies_timeout into use
From
Imre,

On Tue, May 14, 2013 at 10:48 AM, Imre Deak <imre.deak@intel.com> wrote:
> Use usecs_to_jiffies_timeout instead of open-coding the same.
>
> Signed-off-by: Imre Deak <imre.deak@intel.com>

Acked-by: Eduardo Valentin <edubezval@gmail.com>

> ---
> drivers/media/radio/si4713-i2c.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/radio/si4713-i2c.c b/drivers/media/radio/si4713-i2c.c
> index fe16088..e12f058 100644
> --- a/drivers/media/radio/si4713-i2c.c
> +++ b/drivers/media/radio/si4713-i2c.c
> @@ -233,7 +233,7 @@ static int si4713_send_command(struct si4713_device *sdev, const u8 command,
>
> /* Wait response from interrupt */
> if (!wait_for_completion_timeout(&sdev->work,
> - usecs_to_jiffies(usecs) + 1))
> + usecs_to_jiffies_timeout(usecs)))
> v4l2_warn(&sdev->sd,
> "(%s) Device took too much time to answer.\n",
> __func__);
> @@ -470,7 +470,7 @@ static int si4713_wait_stc(struct si4713_device *sdev, const int usecs)
>
> /* Wait response from STC interrupt */
> if (!wait_for_completion_timeout(&sdev->work,
> - usecs_to_jiffies(usecs) + 1))
> + usecs_to_jiffies_timeout(usecs)))
> v4l2_warn(&sdev->sd,
> "%s: device took too much time to answer (%d usec).\n",
> __func__, usecs);
> --
> 1.7.10.4
>



--
Eduardo Bezerra Valentin


\
 
 \ /
  Last update: 2013-05-14 20:01    [W:0.293 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site