staging: comedi: comedi_fops: simplify comedi_is_subdevice_idle()
authorIan Abbott <abbotti@mev.co.uk>
Fri, 27 Mar 2015 15:13:02 +0000 (15:13 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Apr 2015 11:11:53 +0000 (13:11 +0200)
Don't use a conditional operator when a simple "not" will do.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_fops.c

index 17ac285..9e49c8a 100644 (file)
@@ -652,7 +652,7 @@ static bool comedi_is_subdevice_idle(struct comedi_subdevice *s)
 {
        unsigned runflags = comedi_get_subdevice_runflags(s);
 
-       return (runflags & COMEDI_SRF_BUSY_MASK) ? false : true;
+       return !(runflags & COMEDI_SRF_BUSY_MASK);
 }
 
 /**