Commit 56e97078 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: ni_tiocmd: (!foo) preferred over (foo == NULL)

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9bacea57
...@@ -201,7 +201,7 @@ int ni_tio_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -201,7 +201,7 @@ int ni_tio_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&counter->lock, flags); spin_lock_irqsave(&counter->lock, flags);
if (counter->mite_chan == NULL) { if (!counter->mite_chan) {
dev_err(counter->counter_dev->dev->class_dev, dev_err(counter->counter_dev->dev->class_dev,
"commands only supported with DMA. "); "commands only supported with DMA. ");
dev_err(counter->counter_dev->dev->class_dev, dev_err(counter->counter_dev->dev->class_dev,
...@@ -329,7 +329,7 @@ static int should_ack_gate(struct ni_gpct *counter) ...@@ -329,7 +329,7 @@ static int should_ack_gate(struct ni_gpct *counter)
case ni_gpct_variant_e_series: case ni_gpct_variant_e_series:
spin_lock_irqsave(&counter->lock, flags); spin_lock_irqsave(&counter->lock, flags);
{ {
if (counter->mite_chan == NULL || if (!counter->mite_chan ||
counter->mite_chan->dir != COMEDI_INPUT || counter->mite_chan->dir != COMEDI_INPUT ||
(mite_done(counter->mite_chan))) { (mite_done(counter->mite_chan))) {
retval = 1; retval = 1;
...@@ -443,7 +443,7 @@ void ni_tio_handle_interrupt(struct ni_gpct *counter, ...@@ -443,7 +443,7 @@ void ni_tio_handle_interrupt(struct ni_gpct *counter,
break; break;
} }
spin_lock_irqsave(&counter->lock, flags); spin_lock_irqsave(&counter->lock, flags);
if (counter->mite_chan == NULL) { if (!counter->mite_chan) {
spin_unlock_irqrestore(&counter->lock, flags); spin_unlock_irqrestore(&counter->lock, flags);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment