Skip to content

Commit

Permalink
staging: comedi: pcmuio: pointers should be cleared with NULL
Browse files Browse the repository at this point in the history
Pointer variables should be cleared with NULL on 0. This quiets
some sparse warnings about:

warning: Using plain integer as NULL pointer

Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
H Hartley Sweeten authored and gregkh committed Sep 17, 2012
1 parent 765c3c6 commit 920e2ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/pcmuio.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ static void pcmuio_stop_intr(struct comedi_device *dev,

subpriv->intr.enabled_mask = 0;
subpriv->intr.active = 0;
s->async->inttrig = 0;
s->async->inttrig = NULL;
nports = subpriv->intr.num_asic_chans / CHANS_PER_PORT;
firstport = subpriv->intr.asic_chan / CHANS_PER_PORT;
switch_page(dev, asic, PAGE_ENAB);
Expand Down Expand Up @@ -683,7 +683,7 @@ pcmuio_inttrig_start_intr(struct comedi_device *dev, struct comedi_subdevice *s,
return -EINVAL;

spin_lock_irqsave(&subpriv->intr.spinlock, flags);
s->async->inttrig = 0;
s->async->inttrig = NULL;
if (subpriv->intr.active)
event = pcmuio_start_intr(dev, s);

Expand Down

0 comments on commit 920e2ff

Please sign in to comment.