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/ds1620.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/ds1620.c')
-rw-r--r-- | drivers/char/ds1620.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c index dbee8688f75c..aab9605f0b43 100644 --- a/drivers/char/ds1620.c +++ b/drivers/char/ds1620.c | |||
@@ -8,7 +8,7 @@ | |||
8 | #include <linux/proc_fs.h> | 8 | #include <linux/proc_fs.h> |
9 | #include <linux/capability.h> | 9 | #include <linux/capability.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/smp_lock.h> | 11 | #include <linux/mutex.h> |
12 | 12 | ||
13 | #include <mach/hardware.h> | 13 | #include <mach/hardware.h> |
14 | #include <asm/mach-types.h> | 14 | #include <asm/mach-types.h> |
@@ -34,6 +34,7 @@ | |||
34 | #define CFG_CPU 2 | 34 | #define CFG_CPU 2 |
35 | #define CFG_1SHOT 1 | 35 | #define CFG_1SHOT 1 |
36 | 36 | ||
37 | static DEFINE_MUTEX(ds1620_mutex); | ||
37 | static const char *fan_state[] = { "off", "on", "on (hardwired)" }; | 38 | static const char *fan_state[] = { "off", "on", "on (hardwired)" }; |
38 | 39 | ||
39 | /* | 40 | /* |
@@ -210,7 +211,6 @@ static void ds1620_read_state(struct therm *therm) | |||
210 | 211 | ||
211 | static int ds1620_open(struct inode *inode, struct file *file) | 212 | static int ds1620_open(struct inode *inode, struct file *file) |
212 | { | 213 | { |
213 | cycle_kernel_lock(); | ||
214 | return nonseekable_open(inode, file); | 214 | return nonseekable_open(inode, file); |
215 | } | 215 | } |
216 | 216 | ||
@@ -321,9 +321,9 @@ ds1620_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
321 | { | 321 | { |
322 | int ret; | 322 | int ret; |
323 | 323 | ||
324 | lock_kernel(); | 324 | mutex_lock(&ds1620_mutex); |
325 | ret = ds1620_ioctl(file, cmd, arg); | 325 | ret = ds1620_ioctl(file, cmd, arg); |
326 | unlock_kernel(); | 326 | mutex_unlock(&ds1620_mutex); |
327 | 327 | ||
328 | return ret; | 328 | return ret; |
329 | } | 329 | } |
@@ -357,6 +357,7 @@ static const struct file_operations ds1620_fops = { | |||
357 | .open = ds1620_open, | 357 | .open = ds1620_open, |
358 | .read = ds1620_read, | 358 | .read = ds1620_read, |
359 | .unlocked_ioctl = ds1620_unlocked_ioctl, | 359 | .unlocked_ioctl = ds1620_unlocked_ioctl, |
360 | .llseek = no_llseek, | ||
360 | }; | 361 | }; |
361 | 362 | ||
362 | static struct miscdevice ds1620_miscdev = { | 363 | static struct miscdevice ds1620_miscdev = { |