summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorShawn Bohrer <shawn.bohrer@gmail.com>2009-10-18 15:32:15 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 12:23:01 -0800
commit00a1855c21ab1efc71db98b0a87ea3d0ee7b8d92 (patch)
tree7cba0653ee06542ab2a1198571a9c249354fdd1f /drivers
parent013f230c4f2622cbbc736c50223b49bced024655 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/comedi_compat32.c10
-rw-r--r--drivers/staging/comedi/comedi_fops.c9
-rw-r--r--drivers/staging/comedi/drivers/serial2002.c9
3 files changed, 2 insertions, 26 deletions
diff --git a/drivers/staging/comedi/comedi_compat32.c b/drivers/staging/comedi/comedi_compat32.c
index e2d7e6975263..04682d38e302 100644
--- a/drivers/staging/comedi/comedi_compat32.c
+++ b/drivers/staging/comedi/comedi_compat32.c
@@ -101,22 +101,12 @@ static int translated_ioctl(struct file *file, unsigned int cmd,
if (!file->f_op)
return -ENOTTY;
-#ifdef HAVE_UNLOCKED_IOCTL
if (file->f_op->unlocked_ioctl) {
int rc = (int)(*file->f_op->unlocked_ioctl) (file, cmd, arg);
if (rc == -ENOIOCTLCMD)
rc = -ENOTTY;
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;
}
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index aaad76e0a76a..a79b37f591ae 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -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_write_buffer_kb;
-#ifdef HAVE_UNLOCKED_IOCTL
static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd,
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);
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 = {
.owner = THIS_MODULE,
-#ifdef HAVE_UNLOCKED_IOCTL
.unlocked_ioctl = comedi_unlocked_ioctl,
-#else
- .ioctl = comedi_ioctl,
-#endif
#ifdef HAVE_COMPAT_IOCTL
.compat_ioctl = comedi_compat_ioctl,
#endif
diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c
index 82aa86e718b2..e7c13eba983b 100644
--- a/drivers/staging/comedi/drivers/serial2002.c
+++ b/drivers/staging/comedi/drivers/serial2002.c
@@ -125,14 +125,9 @@ struct serial_data {
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);
- }
-#endif
- if (f->f_op->ioctl) {
- return f->f_op->ioctl(f->f_dentry->d_inode, f, op, param);
- }
+
return -ENOSYS;
}