]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: don't return minor from comedi_alloc_subdevice_minor()
authorIan Abbott <abbotti@mev.co.uk>
Thu, 7 Feb 2013 16:03:00 +0000 (16:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Feb 2013 01:17:16 +0000 (17:17 -0800)
`comedi_alloc_subdevice_minor()` currently returns the allocated minor
device number on success.  This is not really of any interest to the
caller (in fact the return value is not even checked), so just return 0
on success.  If the caller really needs to know the allocated minor
device number it can look in `s->minor`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_fops.c

index b1e8cdbd1ce7bfeb5c2289c273e1534f48620b18..4f587ea136349a28971dac148c274b666b89d47d 100644 (file)
@@ -2383,7 +2383,7 @@ int comedi_alloc_subdevice_minor(struct comedi_subdevice *s)
                s->class_dev = csdev;
        dev_set_drvdata(csdev, info);
 
-       return i;
+       return 0;
 }
 
 void comedi_free_subdevice_minor(struct comedi_subdevice *s)