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 17ac2858205d99cc1f5715b33165f04adb2387f0..9e49c8ac0cbabe8679c68782c2b272454095ea52 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);
 }
 
 /**