X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fchar%2Fds1620.c;h=34275c6f1da282f14de6a2b3bb9c874b87586de6;hb=82638844d9a8581bbf33201cc209a14876eca167;hp=48cb8f0e8ebf8000e5dcc697d1d20383ae7cfd50;hpb=62322d2554d2f9680c8ace7bbf1f97d8fa84ad1a;p=pandora-kernel.git diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c index 48cb8f0e8ebf..34275c6f1da2 100644 --- a/drivers/char/ds1620.c +++ b/drivers/char/ds1620.c @@ -3,13 +3,12 @@ * thermometer driver (as used in the Rebel.com NetWinder) */ #include -#include #include -#include #include #include #include #include +#include #include #include @@ -210,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) { @@ -338,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, };