diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/char/dtlk.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/char/dtlk.c')
-rw-r--r-- | drivers/char/dtlk.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c index e3859d4eaead..85156dd0caee 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; |
@@ -105,6 +106,7 @@ static const struct file_operations dtlk_fops = | |||
105 | .unlocked_ioctl = dtlk_ioctl, | 106 | .unlocked_ioctl = dtlk_ioctl, |
106 | .open = dtlk_open, | 107 | .open = dtlk_open, |
107 | .release = dtlk_release, | 108 | .release = dtlk_release, |
109 | .llseek = no_llseek, | ||
108 | }; | 110 | }; |
109 | 111 | ||
110 | /* local prototypes */ | 112 | /* local prototypes */ |
@@ -275,9 +277,9 @@ static long dtlk_ioctl(struct file *file, | |||
275 | switch (cmd) { | 277 | switch (cmd) { |
276 | 278 | ||
277 | case DTLK_INTERROGATE: | 279 | case DTLK_INTERROGATE: |
278 | lock_kernel(); | 280 | mutex_lock(&dtlk_mutex); |
279 | sp = dtlk_interrogate(); | 281 | sp = dtlk_interrogate(); |
280 | unlock_kernel(); | 282 | mutex_unlock(&dtlk_mutex); |
281 | if (copy_to_user(argp, sp, sizeof(struct dtlk_settings))) | 283 | if (copy_to_user(argp, sp, sizeof(struct dtlk_settings))) |
282 | return -EINVAL; | 284 | return -EINVAL; |
283 | return 0; | 285 | return 0; |
@@ -296,7 +298,6 @@ static int dtlk_open(struct inode *inode, struct file *file) | |||
296 | { | 298 | { |
297 | TRACE_TEXT("(dtlk_open"); | 299 | TRACE_TEXT("(dtlk_open"); |
298 | 300 | ||
299 | cycle_kernel_lock(); | ||
300 | nonseekable_open(inode, file); | 301 | nonseekable_open(inode, file); |
301 | switch (iminor(inode)) { | 302 | switch (iminor(inode)) { |
302 | case DTLK_MINOR: | 303 | case DTLK_MINOR: |