diff options
author | Christoph Hellwig <hch@lst.de> | 2005-08-04 16:05:37 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-08-04 16:05:37 +0200 |
commit | 3873658be7b3896e88648664e480a44d12083ad8 (patch) | |
tree | efaa703103f650da42d072d7c517a33839d68baf /drivers/sbus/char/vfc_i2c.c | |
parent | Merge master.kernel.org:/pub/scm/linux/kernel/git/lenb/to-linus (diff) | |
download | linux-3873658be7b3896e88648664e480a44d12083ad8.tar.xz linux-3873658be7b3896e88648664e480a44d12083ad8.zip |
[SPARC]: Fix up sleep_on() removal in vfc driver.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/sbus/char/vfc_i2c.c')
-rw-r--r-- | drivers/sbus/char/vfc_i2c.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/sbus/char/vfc_i2c.c b/drivers/sbus/char/vfc_i2c.c index 1faf1e75f71f..739cad9b19a1 100644 --- a/drivers/sbus/char/vfc_i2c.c +++ b/drivers/sbus/char/vfc_i2c.c @@ -79,25 +79,10 @@ int vfc_pcf8584_init(struct vfc_dev *dev) return 0; } -void vfc_i2c_delay_wakeup(struct vfc_dev *dev) -{ - /* Used to profile code and eliminate too many delays */ - VFC_I2C_DEBUG_PRINTK(("vfc%d: Delaying\n", dev->instance)); - wake_up(&dev->poll_wait); -} - 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 + 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); - prepare_to_wait(&dev->poll_wait, &wait, TASK_UNINTERRUPTIBLE); - schedule(); - del_timer(&dev->poll_timer); - finish_wait(&dev->poll_wait, &wait); + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(usecs_to_jiffies(usecs)); } void inline vfc_i2c_delay(struct vfc_dev *dev) |