aboutsummaryrefslogtreecommitdiff
path: root/drivers/sbus/char/vfc_i2c.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-07-25 15:46:44 -0700
committerTony Luck <tony.luck@intel.com>2005-07-25 15:46:44 -0700
commit05cb784c81a0fd1f97732156ea464bd392ce875a (patch)
tree24122979b411dcec6ff390fc9ae84ad9413128e9 /drivers/sbus/char/vfc_i2c.c
parent3190186362466658f01b2e354e639378ce07e1a9 (diff)
parent6b6a93c6876ea1c530d5d3f68e3678093a27fab0 (diff)
Auto merge with /home/aegl/GIT/linus
Diffstat (limited to 'drivers/sbus/char/vfc_i2c.c')
-rw-r--r--drivers/sbus/char/vfc_i2c.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/sbus/char/vfc_i2c.c b/drivers/sbus/char/vfc_i2c.c
index 95e3cebf792..1faf1e75f71 100644
--- a/drivers/sbus/char/vfc_i2c.c
+++ b/drivers/sbus/char/vfc_i2c.c
@@ -88,14 +88,16 @@ void vfc_i2c_delay_wakeup(struct vfc_dev *dev)
void vfc_i2c_delay_no_busy(struct vfc_dev *dev, unsigned long usecs)
{
+ DEFINE_WAIT(wait);
init_timer(&dev->poll_timer);
- dev->poll_timer.expires = jiffies +
- ((unsigned long)usecs*(HZ))/1000000;
+ dev->poll_timer.expires = jiffies + usecs_to_jiffies(usecs);
dev->poll_timer.data=(unsigned long)dev;
dev->poll_timer.function=(void *)(unsigned long)vfc_i2c_delay_wakeup;
add_timer(&dev->poll_timer);
- sleep_on(&dev->poll_wait);
+ prepare_to_wait(&dev->poll_wait, &wait, TASK_UNINTERRUPTIBLE);
+ schedule();
del_timer(&dev->poll_timer);
+ finish_wait(&dev->poll_wait, &wait);
}
void inline vfc_i2c_delay(struct vfc_dev *dev)