Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207114
b: refs/heads/master
c: 096b7bd
h: refs/heads/master
v: v3
  • Loading branch information
Jesper Nilsson committed Aug 4, 2010
1 parent a58d77a commit e7fd778
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 90276a1a64e2ab732e26e3ac68febbf3ad04c517
refs/heads/master: 096b7bdc8663c16417ff5fbec42622302e6886e1
2 changes: 0 additions & 2 deletions trunk/arch/cris/arch-v10/drivers/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/smp_lock.h>
#include <linux/wait.h>
#include <asm/uaccess.h>
#include "i2c.h"
Expand Down Expand Up @@ -376,7 +375,6 @@ int __init eeprom_init(void)
/* Opens the device. */
static int eeprom_open(struct inode * inode, struct file * file)
{
cycle_kernel_lock();
if(iminor(inode) != EEPROM_MINOR_NR)
return -ENXIO;
if(imajor(inode) != EEPROM_MAJOR_NR)
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/cris/arch-v10/drivers/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#include <linux/module.h>
#include <linux/sched.h>
#include <linux/smp_lock.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/fs.h>
Expand Down Expand Up @@ -566,7 +565,6 @@ i2c_readreg(unsigned char theSlave, unsigned char theReg)
static int
i2c_open(struct inode *inode, struct file *filp)
{
cycle_kernel_lock();
return 0;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/cris/arch-v32/drivers/cryptocop.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <linux/string.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/smp_lock.h>
#include <linux/spinlock.h>
#include <linux/stddef.h>

Expand Down Expand Up @@ -2307,7 +2306,6 @@ static int cryptocop_open(struct inode *inode, struct file *filp)
{
int p = iminor(inode);

cycle_kernel_lock();
if (p != CRYPTOCOP_MINOR) return -EINVAL;

filp->private_data = NULL;
Expand Down
12 changes: 6 additions & 6 deletions trunk/arch/cris/arch-v32/drivers/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <linux/fs.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <linux/mutex.h>

#include <asm/etraxi2c.h>

Expand All @@ -47,6 +47,7 @@
#define D(x)

#define I2C_MAJOR 123 /* LOCAL/EXPERIMENTAL */
static DEFINE_MUTEX(i2c_mutex);
static const char i2c_name[] = "i2c";

#define CLOCK_LOW_TIME 8
Expand Down Expand Up @@ -636,7 +637,6 @@ i2c_readreg(unsigned char theSlave, unsigned char theReg)
static int
i2c_open(struct inode *inode, struct file *filp)
{
cycle_kernel_lock();
return 0;
}

Expand Down Expand Up @@ -665,11 +665,11 @@ i2c_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
I2C_ARGREG(arg),
I2C_ARGVALUE(arg)));

lock_kernel();
mutex_lock(&i2c_mutex);
ret = i2c_writereg(I2C_ARGSLAVE(arg),
I2C_ARGREG(arg),
I2C_ARGVALUE(arg));
unlock_kernel();
mutex_unlock(&i2c_mutex);
return ret;

case I2C_READREG:
Expand All @@ -679,9 +679,9 @@ i2c_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
D(printk("i2cr %d %d ",
I2C_ARGSLAVE(arg),
I2C_ARGREG(arg)));
lock_kernel();
mutex_lock(&i2c_mutex);
val = i2c_readreg(I2C_ARGSLAVE(arg), I2C_ARGREG(arg));
unlock_kernel();
mutex_unlock(&i2c_mutex);
D(printk("= %d\n", val));
return val;
}
Expand Down

0 comments on commit e7fd778

Please sign in to comment.