diff options
author | Christoph Hellwig <hch@lst.de> | 2005-08-04 10:05:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-08-04 10:05:37 -0400 |
commit | 3873658be7b3896e88648664e480a44d12083ad8 (patch) | |
tree | efaa703103f650da42d072d7c517a33839d68baf /drivers/sbus/char | |
parent | d95a1b4818f2fe38a3cfc9a7d5817dc9a1a69329 (diff) |
[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')
-rw-r--r-- | drivers/sbus/char/vfc.h | 2 | ||||
-rw-r--r-- | drivers/sbus/char/vfc_dev.c | 1 | ||||
-rw-r--r-- | drivers/sbus/char/vfc_i2c.c | 19 |
3 files changed, 2 insertions, 20 deletions
diff --git a/drivers/sbus/char/vfc.h b/drivers/sbus/char/vfc.h index e56a43af0f62..a7782e7da42e 100644 --- a/drivers/sbus/char/vfc.h +++ b/drivers/sbus/char/vfc.h | |||
@@ -129,8 +129,6 @@ struct vfc_dev { | |||
129 | struct vfc_regs *phys_regs; | 129 | struct vfc_regs *phys_regs; |
130 | unsigned int control_reg; | 130 | unsigned int control_reg; |
131 | struct semaphore device_lock_sem; | 131 | struct semaphore device_lock_sem; |
132 | struct timer_list poll_timer; | ||
133 | wait_queue_head_t poll_wait; | ||
134 | int instance; | 132 | int instance; |
135 | int busy; | 133 | int busy; |
136 | unsigned long which_io; | 134 | unsigned long which_io; |
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c index 86ce54130954..7a103698fa3c 100644 --- a/drivers/sbus/char/vfc_dev.c +++ b/drivers/sbus/char/vfc_dev.c | |||
@@ -137,7 +137,6 @@ int init_vfc_devstruct(struct vfc_dev *dev, int instance) | |||
137 | dev->instance=instance; | 137 | dev->instance=instance; |
138 | init_MUTEX(&dev->device_lock_sem); | 138 | init_MUTEX(&dev->device_lock_sem); |
139 | dev->control_reg=0; | 139 | dev->control_reg=0; |
140 | init_waitqueue_head(&dev->poll_wait); | ||
141 | dev->busy=0; | 140 | dev->busy=0; |
142 | return 0; | 141 | return 0; |
143 | } | 142 | } |
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) | |||
79 | return 0; | 79 | return 0; |
80 | } | 80 | } |
81 | 81 | ||
82 | void vfc_i2c_delay_wakeup(struct vfc_dev *dev) | ||
83 | { | ||
84 | /* Used to profile code and eliminate too many delays */ | ||
85 | VFC_I2C_DEBUG_PRINTK(("vfc%d: Delaying\n", dev->instance)); | ||
86 | wake_up(&dev->poll_wait); | ||
87 | } | ||
88 | |||
89 | void vfc_i2c_delay_no_busy(struct vfc_dev *dev, unsigned long usecs) | 82 | void vfc_i2c_delay_no_busy(struct vfc_dev *dev, unsigned long usecs) |
90 | { | 83 | { |
91 | DEFINE_WAIT(wait); | 84 | set_current_state(TASK_UNINTERRUPTIBLE); |
92 | init_timer(&dev->poll_timer); | 85 | schedule_timeout(usecs_to_jiffies(usecs)); |
93 | dev->poll_timer.expires = jiffies + usecs_to_jiffies(usecs); | ||
94 | dev->poll_timer.data=(unsigned long)dev; | ||
95 | dev->poll_timer.function=(void *)(unsigned long)vfc_i2c_delay_wakeup; | ||
96 | add_timer(&dev->poll_timer); | ||
97 | prepare_to_wait(&dev->poll_wait, &wait, TASK_UNINTERRUPTIBLE); | ||
98 | schedule(); | ||
99 | del_timer(&dev->poll_timer); | ||
100 | finish_wait(&dev->poll_wait, &wait); | ||
101 | } | 86 | } |
102 | 87 | ||
103 | void inline vfc_i2c_delay(struct vfc_dev *dev) | 88 | void inline vfc_i2c_delay(struct vfc_dev *dev) |