[PATCH 05/11] media/si4713-i2c: take usecs_to_jiffies_min into use

From: Imre Deak
Date: Fri May 10 2013 - 08:13:56 EST


Use usecs_to_jiffies_min instead of open-coding the same.

Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
---
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 bd61b3b..09eb6b9 100644
--- a/drivers/media/radio/si4713-i2c.c
+++ b/drivers/media/radio/si4713-i2c.c
@@ -252,7 +252,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_min(usecs)))
v4l2_warn(&sdev->sd,
"(%s) Device took too much time to answer.\n",
__func__);
@@ -494,7 +494,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_min(usecs)))
v4l2_warn(&sdev->sd,
"%s: device took too much time to answer (%d usec).\n",
__func__, usecs);
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/