summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2013-01-08 00:17:52 +0100
committerGreg Kroah-Hartman2013-01-08 00:17:52 +0100
commit17cb3be61b45d716f6b21a9380925493413ce0ed (patch)
treed29ca8bc010a22f358032346d7e7b6887c455e08 /drivers/staging/comedi/comedi_fops.c
parentstaging: android: Add some Kconfig help entries (diff)
parentstaging: tidspbridge: use prepare/unprepare on dsp clocks (diff)
downloadkernel-qcow2-linux-17cb3be61b45d716f6b21a9380925493413ce0ed.tar.gz
kernel-qcow2-linux-17cb3be61b45d716f6b21a9380925493413ce0ed.tar.xz
kernel-qcow2-linux-17cb3be61b45d716f6b21a9380925493413ce0ed.zip
Merge branch 'staging-linus' into staging-next
This is to get the comedi fixes, and resolve the issue in comdi_test.c and comedi_fops.c that were caused by changes in both branches. It also allows the fwserial driver changes to be applied, as they required the fixes that are in staging-linus. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_fops.c')
-rw-r--r--drivers/staging/comedi/comedi_fops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 2fd577fa941e..cd2c7d40d4db 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -1648,6 +1648,7 @@ static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd,
{
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_device *dev = comedi_dev_from_minor(minor);
+ struct comedi_file_info *info = comedi_file_info_from_minor(minor);
int rc;
if (!dev)
@@ -1660,6 +1661,9 @@ static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd,
if (cmd == COMEDI_DEVCONFIG) {
rc = do_devconfig_ioctl(dev,
(struct comedi_devconfig __user *)arg);
+ if (rc == 0)
+ /* Evade comedi_auto_unconfig(). */
+ info->hardware_device = NULL;
goto done;
}