diff options
author | Jesper Nilsson <jesper.nilsson@axis.com> | 2010-07-30 19:04:37 +0200 |
---|---|---|
committer | Jesper Nilsson <jesper.nilsson@axis.com> | 2010-08-04 12:58:57 +0200 |
commit | 90276a1a64e2ab732e26e3ac68febbf3ad04c517 (patch) | |
tree | 423dae23a180e282082e5346705022ad252d1c20 /arch/cris/arch-v32/drivers/cryptocop.c | |
parent | 3648bdf79f7e020c3a28c9c842111879d8e506c0 (diff) |
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-v32/drivers/cryptocop.c')
-rw-r--r-- | arch/cris/arch-v32/drivers/cryptocop.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c index b70fb34939d..9cfbfae107c 100644 --- a/arch/cris/arch-v32/drivers/cryptocop.c +++ b/arch/cris/arch-v32/drivers/cryptocop.c @@ -217,7 +217,7 @@ static int cryptocop_open(struct inode *, struct file *); static int cryptocop_release(struct inode *, struct file *); -static int cryptocop_ioctl(struct inode *inode, struct file *file, +static long cryptocop_ioctl(struct file *file, unsigned int cmd, unsigned long arg); static void cryptocop_start_job(void); @@ -279,10 +279,10 @@ static void print_user_dma_lists(struct cryptocop_dma_list_operation *dma_op); const struct file_operations cryptocop_fops = { - .owner = THIS_MODULE, - .open = cryptocop_open, - .release = cryptocop_release, - .ioctl = cryptocop_ioctl + .owner = THIS_MODULE, + .open = cryptocop_open, + .release = cryptocop_release, + .unlocked_ioctl = cryptocop_ioctl }; @@ -3102,7 +3102,8 @@ static int cryptocop_ioctl_create_session(struct inode *inode, struct file *filp return 0; } -static int cryptocop_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) +static long cryptocop_ioctl_unlocked(struct inode *inode, + struct file *filp, unsigned int cmd, unsigned long arg) { int err = 0; if (_IOC_TYPE(cmd) != ETRAXCRYPTOCOP_IOCTYPE) { @@ -3134,6 +3135,19 @@ static int cryptocop_ioctl(struct inode *inode, struct file *filp, unsigned int return 0; } +static long +cryptocop_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) +{ + struct inode *inode = file->f_path.dentry->d_inode; + long ret; + + lock_kernel(); + ret = cryptocop_ioctl_unlocked(inode, filp, cmd, arg); + unlock_kernel(); + + return ret; +} + #ifdef LDEBUG static void print_dma_descriptors(struct cryptocop_int_operation *iop) |