return di;
}
-static int
-mod_generic_ioctl(struct inode *ino, struct file *file,
- unsigned int cmd, unsigned long arg)
+static long
+mod_generic_unlocked_ioctl(struct file *file,
+ unsigned int cmd, unsigned long arg)
{
+ struct inode *ino = file->f_dentry->d_inode;
struct dev_info *di;
int rc, flags = 0, rvalp = 0;
cred_t *cr = NULL;
mod_generic_compat_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{
- return mod_generic_ioctl(file->f_dentry->d_inode, file, cmd, arg);
+ return mod_generic_unlocked_ioctl(file, cmd, arg);
}
#endif /* CONFIG_COMPAT */
/* Setup the fops to cb_ops mapping */
fops->owner = mod;
if (cb_ops->cb_ioctl) {
- fops->ioctl = mod_generic_ioctl;
+ fops->unlocked_ioctl = mod_generic_unlocked_ioctl;
#ifdef CONFIG_COMPAT
fops->compat_ioctl = mod_generic_compat_ioctl;
#endif
return rc;
}
-static int
-splat_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+static long
+splat_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
unsigned int minor = iminor(file->f_dentry->d_inode);
int rc = 0;
static long
splat_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
- return splat_ioctl(NULL, file, cmd, arg);
+ return splat_unlocked_ioctl(file, cmd, arg);
}
#endif /* CONFIG_COMPAT */
.owner = THIS_MODULE,
.open = splat_open,
.release = splat_release,
- .ioctl = splat_ioctl,
+ .unlocked_ioctl = splat_unlocked_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = splat_compat_ioctl,
#endif