git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'linus' into cpus4096
[pandora-kernel.git]
/
drivers
/
char
/
ds1620.c
diff --git
a/drivers/char/ds1620.c
b/drivers/char/ds1620.c
index
3d7efc2
..
34275c6
100644
(file)
--- a/
drivers/char/ds1620.c
+++ b/
drivers/char/ds1620.c
@@
-4,11
+4,11
@@
*/
#include <linux/module.h>
#include <linux/miscdevice.h>
*/
#include <linux/module.h>
#include <linux/miscdevice.h>
-#include <linux/smp_lock.h>
#include <linux/delay.h>
#include <linux/proc_fs.h>
#include <linux/capability.h>
#include <linux/init.h>
#include <linux/delay.h>
#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>
#include <asm/hardware.h>
#include <asm/mach-types.h>
@@
-209,6
+209,12
@@
static void ds1620_read_state(struct therm *therm)
therm->hi = cvt_9_to_int(ds1620_in(THERM_READ_TH, 9));
}
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)
{
static ssize_t
ds1620_read(struct file *file, char __user *buf, size_t count, loff_t *ptr)
{
@@
-337,7
+343,7
@@
static struct proc_dir_entry *proc_therm_ds1620;
static const struct file_operations ds1620_fops = {
.owner = THIS_MODULE,
static const struct file_operations ds1620_fops = {
.owner = THIS_MODULE,
- .open =
nonseekable
_open,
+ .open =
ds1620
_open,
.read = ds1620_read,
.ioctl = ds1620_ioctl,
};
.read = ds1620_read,
.ioctl = ds1620_ioctl,
};