diff options
author | Christoph Hellwig <hch@lst.de> | 2005-07-04 16:24:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-04 16:24:14 -0400 |
commit | 06326e40b7c66477d4a460bfc23c951f7b39f191 (patch) | |
tree | 5ba2c44506ca7a8b2dc6e0a4ea7a83b2da91da31 /drivers/sbus/char/bpp.c | |
parent | e7270dec080002d8aa18256c756af6c32331ef48 (diff) |
[SPARC]: bpp: remove sleep_on usage
Use schedule_timeout() instead of sleep_on + timer. Totally untested
due to lack of hardware, but the changes are rather trivial.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/sbus/char/bpp.c')
-rw-r--r-- | drivers/sbus/char/bpp.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c index 8f0f46907a81..87302fb14885 100644 --- a/drivers/sbus/char/bpp.c +++ b/drivers/sbus/char/bpp.c | |||
@@ -79,10 +79,6 @@ struct inst { | |||
79 | 79 | ||
80 | unsigned char run_length; | 80 | unsigned char run_length; |
81 | unsigned char repeat_byte; | 81 | unsigned char repeat_byte; |
82 | |||
83 | /* These members manage timeouts for programmed delays */ | ||
84 | wait_queue_head_t wait_queue; | ||
85 | struct timer_list timer_list; | ||
86 | }; | 82 | }; |
87 | 83 | ||
88 | static struct inst instances[BPP_NO]; | 84 | static struct inst instances[BPP_NO]; |
@@ -297,16 +293,10 @@ static unsigned short get_pins(unsigned minor) | |||
297 | 293 | ||
298 | #endif /* __sparc__ */ | 294 | #endif /* __sparc__ */ |
299 | 295 | ||
300 | static void bpp_wake_up(unsigned long val) | ||
301 | { wake_up(&instances[val].wait_queue); } | ||
302 | |||
303 | static void snooze(unsigned long snooze_time, unsigned minor) | 296 | static void snooze(unsigned long snooze_time, unsigned minor) |
304 | { | 297 | { |
305 | init_timer(&instances[minor].timer_list); | 298 | set_current_state(TASK_UNINTERRUPTIBLE); |
306 | instances[minor].timer_list.expires = jiffies + snooze_time + 1; | 299 | schedule_timeout(snooze_time + 1); |
307 | instances[minor].timer_list.data = minor; | ||
308 | add_timer(&instances[minor].timer_list); | ||
309 | sleep_on (&instances[minor].wait_queue); | ||
310 | } | 300 | } |
311 | 301 | ||
312 | static int wait_for(unsigned short set, unsigned short clr, | 302 | static int wait_for(unsigned short set, unsigned short clr, |
@@ -880,11 +870,8 @@ static void probeLptPort(unsigned idx) | |||
880 | instances[idx].enhanced = 0; | 870 | instances[idx].enhanced = 0; |
881 | instances[idx].direction = 0; | 871 | instances[idx].direction = 0; |
882 | instances[idx].mode = COMPATIBILITY; | 872 | instances[idx].mode = COMPATIBILITY; |
883 | instances[idx].wait_queue = 0; | ||
884 | instances[idx].run_length = 0; | 873 | instances[idx].run_length = 0; |
885 | instances[idx].run_flag = 0; | 874 | instances[idx].run_flag = 0; |
886 | init_timer(&instances[idx].timer_list); | ||
887 | instances[idx].timer_list.function = bpp_wake_up; | ||
888 | if (!request_region(lpAddr,3, dev_name)) return; | 875 | if (!request_region(lpAddr,3, dev_name)) return; |
889 | 876 | ||
890 | /* | 877 | /* |
@@ -977,11 +964,8 @@ static void probeLptPort(unsigned idx) | |||
977 | instances[idx].enhanced = 0; | 964 | instances[idx].enhanced = 0; |
978 | instances[idx].direction = 0; | 965 | instances[idx].direction = 0; |
979 | instances[idx].mode = COMPATIBILITY; | 966 | instances[idx].mode = COMPATIBILITY; |
980 | init_waitqueue_head(&instances[idx].wait_queue); | ||
981 | instances[idx].run_length = 0; | 967 | instances[idx].run_length = 0; |
982 | instances[idx].run_flag = 0; | 968 | instances[idx].run_flag = 0; |
983 | init_timer(&instances[idx].timer_list); | ||
984 | instances[idx].timer_list.function = bpp_wake_up; | ||
985 | 969 | ||
986 | if (!rp) return; | 970 | if (!rp) return; |
987 | 971 | ||