aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/dtlk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/dtlk.c')
-rw-r--r--drivers/char/dtlk.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c
index d4005e94fe5f..d8dbdb916232 100644
--- a/drivers/char/dtlk.c
+++ b/drivers/char/dtlk.c
@@ -72,6 +72,7 @@
72#define TRACE_RET ((void) 0) 72#define TRACE_RET ((void) 0)
73#endif /* TRACING */ 73#endif /* TRACING */
74 74
75static void dtlk_timer_tick(unsigned long data);
75 76
76static int dtlk_major; 77static int dtlk_major;
77static int dtlk_port_lpc; 78static int dtlk_port_lpc;
@@ -81,7 +82,7 @@ static int dtlk_has_indexing;
81static unsigned int dtlk_portlist[] = 82static unsigned int dtlk_portlist[] =
82{0x25e, 0x29e, 0x2de, 0x31e, 0x35e, 0x39e, 0}; 83{0x25e, 0x29e, 0x2de, 0x31e, 0x35e, 0x39e, 0};
83static wait_queue_head_t dtlk_process_list; 84static wait_queue_head_t dtlk_process_list;
84static struct timer_list dtlk_timer; 85static DEFINE_TIMER(dtlk_timer, dtlk_timer_tick, 0, 0);
85 86
86/* prototypes for file_operations struct */ 87/* prototypes for file_operations struct */
87static ssize_t dtlk_read(struct file *, char __user *, 88static ssize_t dtlk_read(struct file *, char __user *,
@@ -117,7 +118,6 @@ static char dtlk_write_tts(char);
117/* 118/*
118 static void dtlk_handle_error(char, char, unsigned int); 119 static void dtlk_handle_error(char, char, unsigned int);
119 */ 120 */
120static void dtlk_timer_tick(unsigned long data);
121 121
122static ssize_t dtlk_read(struct file *file, char __user *buf, 122static ssize_t dtlk_read(struct file *file, char __user *buf,
123 size_t count, loff_t * ppos) 123 size_t count, loff_t * ppos)
@@ -318,7 +318,7 @@ static int dtlk_release(struct inode *inode, struct file *file)
318 } 318 }
319 TRACE_RET; 319 TRACE_RET;
320 320
321 del_timer(&dtlk_timer); 321 del_timer_sync(&dtlk_timer);
322 322
323 return 0; 323 return 0;
324} 324}
@@ -336,8 +336,6 @@ static int __init dtlk_init(void)
336 if (dtlk_dev_probe() == 0) 336 if (dtlk_dev_probe() == 0)
337 printk(", MAJOR %d\n", dtlk_major); 337 printk(", MAJOR %d\n", dtlk_major);
338 338
339 init_timer(&dtlk_timer);
340 dtlk_timer.function = dtlk_timer_tick;
341 init_waitqueue_head(&dtlk_process_list); 339 init_waitqueue_head(&dtlk_process_list);
342 340
343 return 0; 341 return 0;