mirror of
https://github.com/adulau/aha.git
synced 2024-12-30 20:56:23 +00:00
staging: comedi: Remove check for HAVE_UNLOCKED_IOCTL
All new kernels have unlocked_ioctl so we don't need to check. Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
013f230c4f
commit
00a1855c21
3 changed files with 2 additions and 26 deletions
|
@ -101,22 +101,12 @@ static int translated_ioctl(struct file *file, unsigned int cmd,
|
||||||
if (!file->f_op)
|
if (!file->f_op)
|
||||||
return -ENOTTY;
|
return -ENOTTY;
|
||||||
|
|
||||||
#ifdef HAVE_UNLOCKED_IOCTL
|
|
||||||
if (file->f_op->unlocked_ioctl) {
|
if (file->f_op->unlocked_ioctl) {
|
||||||
int rc = (int)(*file->f_op->unlocked_ioctl) (file, cmd, arg);
|
int rc = (int)(*file->f_op->unlocked_ioctl) (file, cmd, arg);
|
||||||
if (rc == -ENOIOCTLCMD)
|
if (rc == -ENOIOCTLCMD)
|
||||||
rc = -ENOTTY;
|
rc = -ENOTTY;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (file->f_op->ioctl) {
|
|
||||||
int rc;
|
|
||||||
lock_kernel();
|
|
||||||
rc = (*file->f_op->ioctl) (file->f_dentry->d_inode,
|
|
||||||
file, cmd, arg);
|
|
||||||
unlock_kernel();
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
return -ENOTTY;
|
return -ENOTTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,13 +110,8 @@ static struct device_attribute dev_attr_read_buffer_kb;
|
||||||
static struct device_attribute dev_attr_max_write_buffer_kb;
|
static struct device_attribute dev_attr_max_write_buffer_kb;
|
||||||
static struct device_attribute dev_attr_write_buffer_kb;
|
static struct device_attribute dev_attr_write_buffer_kb;
|
||||||
|
|
||||||
#ifdef HAVE_UNLOCKED_IOCTL
|
|
||||||
static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd,
|
static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd,
|
||||||
unsigned long arg)
|
unsigned long arg)
|
||||||
#else
|
|
||||||
static int comedi_ioctl(struct inode *inode, struct file *file,
|
|
||||||
unsigned int cmd, unsigned long arg)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
const unsigned minor = iminor(file->f_dentry->d_inode);
|
const unsigned minor = iminor(file->f_dentry->d_inode);
|
||||||
struct comedi_device_file_info *dev_file_info =
|
struct comedi_device_file_info *dev_file_info =
|
||||||
|
@ -1867,11 +1862,7 @@ static int comedi_fasync(int fd, struct file *file, int on)
|
||||||
|
|
||||||
const struct file_operations comedi_fops = {
|
const struct file_operations comedi_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
#ifdef HAVE_UNLOCKED_IOCTL
|
|
||||||
.unlocked_ioctl = comedi_unlocked_ioctl,
|
.unlocked_ioctl = comedi_unlocked_ioctl,
|
||||||
#else
|
|
||||||
.ioctl = comedi_ioctl,
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_COMPAT_IOCTL
|
#ifdef HAVE_COMPAT_IOCTL
|
||||||
.compat_ioctl = comedi_compat_ioctl,
|
.compat_ioctl = comedi_compat_ioctl,
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -125,14 +125,9 @@ struct serial_data {
|
||||||
|
|
||||||
static long tty_ioctl(struct file *f, unsigned op, unsigned long param)
|
static long tty_ioctl(struct file *f, unsigned op, unsigned long param)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_UNLOCKED_IOCTL
|
if (f->f_op->unlocked_ioctl)
|
||||||
if (f->f_op->unlocked_ioctl) {
|
|
||||||
return f->f_op->unlocked_ioctl(f, op, param);
|
return f->f_op->unlocked_ioctl(f, op, param);
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (f->f_op->ioctl) {
|
|
||||||
return f->f_op->ioctl(f->f_dentry->d_inode, f, op, param);
|
|
||||||
}
|
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue