diff options
Diffstat (limited to 'drivers/char/dtlk.c')
-rw-r--r-- | drivers/char/dtlk.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c index e3859d4eaead..8dd040a945d4 100644 --- a/drivers/char/dtlk.c +++ b/drivers/char/dtlk.c | |||
@@ -57,7 +57,7 @@ | |||
57 | #include <linux/ioport.h> /* for request_region */ | 57 | #include <linux/ioport.h> /* for request_region */ |
58 | #include <linux/delay.h> /* for loops_per_jiffy */ | 58 | #include <linux/delay.h> /* for loops_per_jiffy */ |
59 | #include <linux/sched.h> | 59 | #include <linux/sched.h> |
60 | #include <linux/smp_lock.h> /* cycle_kernel_lock() */ | 60 | #include <linux/mutex.h> |
61 | #include <asm/io.h> /* for inb_p, outb_p, inb, outb, etc. */ | 61 | #include <asm/io.h> /* for inb_p, outb_p, inb, outb, etc. */ |
62 | #include <asm/uaccess.h> /* for get_user, etc. */ | 62 | #include <asm/uaccess.h> /* for get_user, etc. */ |
63 | #include <linux/wait.h> /* for wait_queue */ | 63 | #include <linux/wait.h> /* for wait_queue */ |
@@ -73,6 +73,7 @@ | |||
73 | #define TRACE_RET ((void) 0) | 73 | #define TRACE_RET ((void) 0) |
74 | #endif /* TRACING */ | 74 | #endif /* TRACING */ |
75 | 75 | ||
76 | static DEFINE_MUTEX(dtlk_mutex); | ||
76 | static void dtlk_timer_tick(unsigned long data); | 77 | static void dtlk_timer_tick(unsigned long data); |
77 | 78 | ||
78 | static int dtlk_major; | 79 | static int dtlk_major; |
@@ -275,9 +276,9 @@ static long dtlk_ioctl(struct file *file, | |||
275 | switch (cmd) { | 276 | switch (cmd) { |
276 | 277 | ||
277 | case DTLK_INTERROGATE: | 278 | case DTLK_INTERROGATE: |
278 | lock_kernel(); | 279 | mutex_lock(&dtlk_mutex); |
279 | sp = dtlk_interrogate(); | 280 | sp = dtlk_interrogate(); |
280 | unlock_kernel(); | 281 | mutex_unlock(&dtlk_mutex); |
281 | if (copy_to_user(argp, sp, sizeof(struct dtlk_settings))) | 282 | if (copy_to_user(argp, sp, sizeof(struct dtlk_settings))) |
282 | return -EINVAL; | 283 | return -EINVAL; |
283 | return 0; | 284 | return 0; |
@@ -296,7 +297,6 @@ static int dtlk_open(struct inode *inode, struct file *file) | |||
296 | { | 297 | { |
297 | TRACE_TEXT("(dtlk_open"); | 298 | TRACE_TEXT("(dtlk_open"); |
298 | 299 | ||
299 | cycle_kernel_lock(); | ||
300 | nonseekable_open(inode, file); | 300 | nonseekable_open(inode, file); |
301 | switch (iminor(inode)) { | 301 | switch (iminor(inode)) { |
302 | case DTLK_MINOR: | 302 | case DTLK_MINOR: |