Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d546b896 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: comedidev.h: remove 'new_size' param from subdevice (*buf_change)



This parameter is never used by any of the comedi drivers that provide a
(*buf_change) callback. If the 'new_size' is needed in the callback it can
be found from the 's->async->prealloc_bufsz' as done in the ni_pcidio driver.

Remove the unused parameter.

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 57a4f4cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -268,7 +268,7 @@ static int resize_async_buffer(struct comedi_device *dev,
		return retval;

	if (s->buf_change) {
		retval = s->buf_change(dev, s, new_size);
		retval = s->buf_change(dev, s);
		if (retval < 0)
			return retval;
	}
+1 −2
Original line number Diff line number Diff line
@@ -77,8 +77,7 @@ struct comedi_subdevice {
	int (*cancel)(struct comedi_device *, struct comedi_subdevice *);

	/* called when the buffer changes */
	int (*buf_change)(struct comedi_device *dev,
			  struct comedi_subdevice *s, unsigned long new_size);
	int (*buf_change)(struct comedi_device *, struct comedi_subdevice *);

	void (*munge)(struct comedi_device *dev, struct comedi_subdevice *s,
		      void *data, unsigned int num_bytes,
+1 −1
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ static int __comedi_device_postconfig_async(struct comedi_device *dev,
		return -ENOMEM;
	}
	if (s->buf_change) {
		ret = s->buf_change(dev, s, buf_size);
		ret = s->buf_change(dev, s);
		if (ret < 0)
			return ret;
	}
+1 −2
Original line number Diff line number Diff line
@@ -825,8 +825,7 @@ static int ni_660x_input_poll(struct comedi_device *dev,
}

static int ni_660x_buf_change(struct comedi_device *dev,
			      struct comedi_subdevice *s,
			      unsigned long new_size)
			      struct comedi_subdevice *s)
{
	struct ni_660x_private *devpriv = dev->private;
	struct ni_gpct *counter = s->private;
+1 −1
Original line number Diff line number Diff line
@@ -787,7 +787,7 @@ static int ni_pcidio_cancel(struct comedi_device *dev,
}

static int ni_pcidio_change(struct comedi_device *dev,
			    struct comedi_subdevice *s, unsigned long new_size)
			    struct comedi_subdevice *s)
{
	struct nidio96_private *devpriv = dev->private;
	int ret;
Loading