From 014124ef6c43f2eadbf07318c03691c5305b6183 Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Tue, 17 Aug 2010 20:11:44 +0200 Subject: Drop unnecessary "file *" argument to ncr_ioctl() --- cryptodev_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cryptodev_main.c') diff --git a/cryptodev_main.c b/cryptodev_main.c index a056b44..da75672 100644 --- a/cryptodev_main.c +++ b/cryptodev_main.c @@ -828,7 +828,7 @@ cryptodev_ioctl(struct inode *inode, struct file *filp, return 0; default: - return ncr_ioctl(pcr->ncr, filp, cmd, arg_); + return ncr_ioctl(pcr->ncr, cmd, arg_); } } -- cgit From 5c340eee0020717c793fd9d7e74e5f065225a8f3 Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Tue, 24 Aug 2010 20:17:51 +0200 Subject: Provide file_operations::unlocked_ioctl. file_operations::ioctl is no longer supported in recent kernels. compat_ioctl is not running under the BKL, so the code has to do its own locking anyway (although not everything currently does). --- cryptodev_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'cryptodev_main.c') diff --git a/cryptodev_main.c b/cryptodev_main.c index da75672..541f177 100644 --- a/cryptodev_main.c +++ b/cryptodev_main.c @@ -768,9 +768,8 @@ clonefd(struct file *filp) return ret; } -static int -cryptodev_ioctl(struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg_) +static long +cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_) { void __user *arg = (void __user *)arg_; int __user *p = arg; @@ -907,7 +906,7 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_) case CIOCASYMFEAT: case CRIOGET: case CIOCFSESSION: - return cryptodev_ioctl(NULL, file, cmd, arg_); + return cryptodev_ioctl(file, cmd, arg_); case COMPAT_CIOCGSESSION: if (unlikely(copy_from_user(&compat_sop, arg, @@ -955,7 +954,7 @@ static const struct file_operations cryptodev_fops = { .owner = THIS_MODULE, .open = cryptodev_open, .release = cryptodev_release, - .ioctl = cryptodev_ioctl, + .unlocked_ioctl = cryptodev_ioctl, #ifdef CONFIG_COMPAT .compat_ioctl = cryptodev_compat_ioctl, #endif /* CONFIG_COMPAT */ -- cgit