From 8e27231b22f4d864a58fbe07ab70b1a7e721cb07 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 20 May 2008 19:15:50 +0200 Subject: [PATCH] --- yaml --- r: 100343 b: refs/heads/master c: 080c2226474fa3060fadce9a2341004f477aadb3 h: refs/heads/master i: 100341: 1813bf2a504730eb15467653476ce14e3572669b 100339: 01ffd91829d2b7c81d01093ba7951b3d8590deae 100335: 66fd87d858d7b02bc5b80fbd201d21d45002d87a v: v3 --- [refs] | 2 +- trunk/drivers/char/ds1620.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 4ae5825dafc2..f4f5823a2173 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7ccef46320ecd52c4d20c8aad592599df76bb7a1 +refs/heads/master: 080c2226474fa3060fadce9a2341004f477aadb3 diff --git a/trunk/drivers/char/ds1620.c b/trunk/drivers/char/ds1620.c index 334ad5bbe6b6..34275c6f1da2 100644 --- a/trunk/drivers/char/ds1620.c +++ b/trunk/drivers/char/ds1620.c @@ -8,6 +8,7 @@ #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, };