aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/ds1620.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-18 02:39:39 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-18 02:39:39 -0700
commit49997d75152b3d23c53b0fa730599f2f74c92c65 (patch)
tree46e93126170d02cfec9505172e545732c1b69656 /drivers/char/ds1620.c
parenta0c80b80e0fb48129e4e9d6a9ede914f9ff1850d (diff)
parent5b664cb235e97afbf34db9c4d77f08ebd725335e (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: Documentation/powerpc/booting-without-of.txt drivers/atm/Makefile drivers/net/fs_enet/fs_enet-main.c drivers/pci/pci-acpi.c net/8021q/vlan.c net/iucv/iucv.c
Diffstat (limited to 'drivers/char/ds1620.c')
-rw-r--r--drivers/char/ds1620.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c
index 334ad5bbe6b..34275c6f1da 100644
--- a/drivers/char/ds1620.c
+++ b/drivers/char/ds1620.c
@@ -8,6 +8,7 @@
#include <linux/proc_fs.h>
#include <linux/capability.h>
#include <linux/init.h>
+#include <linux/smp_lock.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
@@ -208,6 +209,12 @@ static void ds1620_read_state(struct therm *therm)
therm->hi = cvt_9_to_int(ds1620_in(THERM_READ_TH, 9));
}
+static int ds1620_open(struct inode *inode, struct file *file)
+{
+ cycle_kernel_lock();
+ return nonseekable_open(inode, file);
+}
+
static ssize_t
ds1620_read(struct file *file, char __user *buf, size_t count, loff_t *ptr)
{
@@ -336,7 +343,7 @@ static struct proc_dir_entry *proc_therm_ds1620;
static const struct file_operations ds1620_fops = {
.owner = THIS_MODULE,
- .open = nonseekable_open,
+ .open = ds1620_open,
.read = ds1620_read,
.ioctl = ds1620_ioctl,
};