From: Ian Abbott Date: Fri, 27 Mar 2015 15:13:02 +0000 (+0000) Subject: staging: comedi: comedi_fops: simplify comedi_is_subdevice_idle() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=38ee1fd309a629a618c031238c5d681ed4239af4;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git staging: comedi: comedi_fops: simplify comedi_is_subdevice_idle() Don't use a conditional operator when a simple "not" will do. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 17ac2858205d..9e49c8ac0cba 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -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); } /**