staging: comedi: pcmuio: pointers should be cleared with NULL
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 17 Sep 2012 20:17:03 +0000 (13:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Sep 2012 22:03:52 +0000 (15:03 -0700)
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 <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/pcmuio.c

index aba6b4516c5fdf2a3aa7f9cfebfa8967755d76b0..0e32119bc3f9a56af1cbbdb5607b9b9dd5d481c0 100644 (file)
@@ -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);
@@ -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);