aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sbus')
-rw-r--r--drivers/sbus/char/bpp.c20
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
88static struct inst instances[BPP_NO]; 84static 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
300static void bpp_wake_up(unsigned long val)
301{ wake_up(&instances[val].wait_queue); }
302
303static void snooze(unsigned long snooze_time, unsigned minor) 296static 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
312static int wait_for(unsigned short set, unsigned short clr, 302static 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