staging: comedi: serial2002: quiet NULL pointer sparse noise

Quiet a number of sparse warnings in this file:

warning: Using plain integer as NULL pointer

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
H Hartley Sweeten 2012-06-07 17:14:25 -07:00 committed by Greg Kroah-Hartman
parent e26d925f42
commit 27494c092a

View File

@ -643,7 +643,7 @@ static int serial_2002_open(struct comedi_device *dev)
if (result) { if (result) {
if (devpriv->tty) { if (devpriv->tty) {
filp_close(devpriv->tty, 0); filp_close(devpriv->tty, NULL);
devpriv->tty = NULL; devpriv->tty = NULL;
} }
} }
@ -653,8 +653,8 @@ static int serial_2002_open(struct comedi_device *dev)
static void serial_2002_close(struct comedi_device *dev) static void serial_2002_close(struct comedi_device *dev)
{ {
if (!IS_ERR(devpriv->tty) && (devpriv->tty != 0)) if (!IS_ERR(devpriv->tty) && devpriv->tty)
filp_close(devpriv->tty, 0); filp_close(devpriv->tty, NULL);
} }
static int serial2002_di_rinsn(struct comedi_device *dev, static int serial2002_di_rinsn(struct comedi_device *dev,
@ -819,7 +819,7 @@ static int serial2002_attach(struct comedi_device *dev,
s->subdev_flags = SDF_READABLE | SDF_GROUND; s->subdev_flags = SDF_READABLE | SDF_GROUND;
s->n_chan = 0; s->n_chan = 0;
s->maxdata = 1; s->maxdata = 1;
s->range_table = 0; s->range_table = NULL;
s->insn_read = &serial2002_ai_rinsn; s->insn_read = &serial2002_ai_rinsn;
/* analog output subdevice */ /* analog output subdevice */
@ -828,7 +828,7 @@ static int serial2002_attach(struct comedi_device *dev,
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITEABLE;
s->n_chan = 0; s->n_chan = 0;
s->maxdata = 1; s->maxdata = 1;
s->range_table = 0; s->range_table = NULL;
s->insn_write = &serial2002_ao_winsn; s->insn_write = &serial2002_ao_winsn;
s->insn_read = &serial2002_ao_rinsn; s->insn_read = &serial2002_ao_rinsn;
@ -838,7 +838,7 @@ static int serial2002_attach(struct comedi_device *dev,
s->subdev_flags = SDF_READABLE | SDF_LSAMPL; s->subdev_flags = SDF_READABLE | SDF_LSAMPL;
s->n_chan = 0; s->n_chan = 0;
s->maxdata = 1; s->maxdata = 1;
s->range_table = 0; s->range_table = NULL;
s->insn_read = &serial2002_ei_rinsn; s->insn_read = &serial2002_ei_rinsn;
return 1; return 1;