diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-05 17:17:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-05 17:17:40 -0400 |
commit | d06e7a56d91328267a96b1a4df4ede7529f829e8 (patch) | |
tree | b8034a35c50986d93cb7c0f691f9471bc27b74d1 /drivers | |
parent | 346fced899c7390e555cf90cd07d1e56b460d21b (diff) | |
parent | 864ae180074931f3a28c84ea85aa8cfeca18bc4f (diff) |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Diffstat (limited to 'drivers')
-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 | ||