aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-07-24 22:34:47 -0400
committerDavid S. Miller <davem@davemloft.net>2005-07-24 22:34:47 -0400
commit2d1aea8dd02ad35658864de52a3e0f9f033e63f4 (patch)
tree23c30e31146d67dd1f0bd2bf6747cf2f9abfeddb
parentcb39d263e751f9cca8055bcacfe5ec863dfe2705 (diff)
[SPARC]: sbus/vfc_i2c: remove sleep_on() usage
Use wait-queue directly instead of the deprecated sleep_on() function. This required adding a local wait-queue. Also use new (added in separate patch to K-J) usecs to jiffies function to convert value. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-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 95e3cebf792c..1faf1e75f71f 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)
88 88
89void vfc_i2c_delay_no_busy(struct vfc_dev *dev, unsigned long usecs) 89void vfc_i2c_delay_no_busy(struct vfc_dev *dev, unsigned long usecs)
90{ 90{
91 DEFINE_WAIT(wait);
91 init_timer(&dev->poll_timer); 92 init_timer(&dev->poll_timer);
92 dev->poll_timer.expires = jiffies + 93 dev->poll_timer.expires = jiffies + usecs_to_jiffies(usecs);
93 ((unsigned long)usecs*(HZ))/1000000;
94 dev->poll_timer.data=(unsigned long)dev; 94 dev->poll_timer.data=(unsigned long)dev;
95 dev->poll_timer.function=(void *)(unsigned long)vfc_i2c_delay_wakeup; 95 dev->poll_timer.function=(void *)(unsigned long)vfc_i2c_delay_wakeup;
96 add_timer(&dev->poll_timer); 96 add_timer(&dev->poll_timer);
97 sleep_on(&dev->poll_wait); 97 prepare_to_wait(&dev->poll_wait, &wait, TASK_UNINTERRUPTIBLE);
98 schedule();
98 del_timer(&dev->poll_timer); 99 del_timer(&dev->poll_timer);
100 finish_wait(&dev->poll_wait, &wait);
99} 101}
100 102
101void inline vfc_i2c_delay(struct vfc_dev *dev) 103void inline vfc_i2c_delay(struct vfc_dev *dev)