X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fchar%2Fds1620.c;h=74e9cd81b5b253b8139d9fbc6ceea59afeb77c27;hb=058ddee5625ade9e9e011b9ae155ac3b8d4eda3a;hp=334ad5bbe6b62a244eed91b9731d121244ea4780;hpb=393bfca19ecdce60a8d9a4d2577cac11ca924a25;p=linux-2.6-omap-h63xx.git diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c index 334ad5bbe6b..74e9cd81b5b 100644 --- a/drivers/char/ds1620.c +++ b/drivers/char/ds1620.c @@ -8,8 +8,9 @@ #include #include #include +#include -#include +#include #include #include #include @@ -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, };