staging: comedi: pcmmio: quiet NULL pointer sparse noise
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 19 Jun 2012 00:03:17 +0000 (17:03 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jun 2012 00:39:21 +0000 (17:39 -0700)
The comedi_async 'inttrig' member is a pointer to a callback
function. NULL should be used to clear it not 0.

This quiets a number of 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>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/pcmmio.c

index 82a60d681eb471e82e9b3674bb3772fd8f19eb96..3d2e6f01c4b716806757d13e64bc1832c3c920d7 100644 (file)
@@ -512,7 +512,7 @@ static void pcmmio_stop_intr(struct comedi_device *dev,
 
        subpriv->dio.intr.enabled_mask = 0;
        subpriv->dio.intr.active = 0;
-       s->async->inttrig = 0;
+       s->async->inttrig = NULL;
        nports = subpriv->dio.intr.num_asic_chans / CHANS_PER_PORT;
        firstport = subpriv->dio.intr.asic_chan / CHANS_PER_PORT;
        switch_page(dev, asic, PAGE_ENAB);
@@ -778,7 +778,7 @@ pcmmio_inttrig_start_intr(struct comedi_device *dev, struct comedi_subdevice *s,
                return -EINVAL;
 
        spin_lock_irqsave(&subpriv->dio.intr.spinlock, flags);
-       s->async->inttrig = 0;
+       s->async->inttrig = NULL;
        if (subpriv->dio.intr.active)
                event = pcmmio_start_intr(dev, s);
        spin_unlock_irqrestore(&subpriv->dio.intr.spinlock, flags);