summaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v10/drivers/i2c.c
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2010-07-30 19:04:37 +0200
committerJesper Nilsson <jesper.nilsson@axis.com>2010-08-04 12:58:57 +0200
commit90276a1a64e2ab732e26e3ac68febbf3ad04c517 (patch)
tree423dae23a180e282082e5346705022ad252d1c20 /arch/cris/arch-v10/drivers/i2c.c
parent3648bdf79f7e020c3a28c9c842111879d8e506c0 (diff)
downloadtalos-op-linux-90276a1a64e2ab732e26e3ac68febbf3ad04c517.tar.gz
talos-op-linux-90276a1a64e2ab732e26e3ac68febbf3ad04c517.zip
cris: Pushdown the bkl from ioctl
From: Frederic Weisbecker <fweisbec@gmail.com> Pushdown the bkl to the remaining drivers using the deprecated .ioctl. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com>
Diffstat (limited to 'arch/cris/arch-v10/drivers/i2c.c')
-rw-r--r--arch/cris/arch-v10/drivers/i2c.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/arch/cris/arch-v10/drivers/i2c.c b/arch/cris/arch-v10/drivers/i2c.c
index a8737a8eb229..399e089bed7a 100644
--- a/arch/cris/arch-v10/drivers/i2c.c
+++ b/arch/cris/arch-v10/drivers/i2c.c
@@ -580,8 +580,7 @@ i2c_release(struct inode *inode, struct file *filp)
*/
static int
-i2c_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+i2c_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long arg)
{
if(_IOC_TYPE(cmd) != ETRAXI2C_IOCTYPE) {
return -EINVAL;
@@ -617,11 +616,22 @@ i2c_ioctl(struct inode *inode, struct file *file,
return 0;
}
+static long i2c_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+{
+ long ret;
+
+ lock_kernel();
+ ret = i2c_ioctl_unlocked(file, cmd, arg);
+ unlock_kernel();
+
+ return ret;
+}
+
static const struct file_operations i2c_fops = {
- .owner = THIS_MODULE,
- .ioctl = i2c_ioctl,
- .open = i2c_open,
- .release = i2c_release,
+ .owner = THIS_MODULE,
+ .unlocked_ioctl = i2c_ioctl,
+ .open = i2c_open,
+ .release = i2c_release,
};
int __init
OpenPOWER on IntegriCloud