Commit f67c6c73 authored by Miquel Raynal's avatar Miquel Raynal Committed by Jonathan Cameron
Browse files

iio: core: Simplify the registration of kfifo buffers



Among all the users of the kfifo buffers, no one uses the
INDIO_BUFFER_HARDWARE mode. So let's take this as a general rule and
simplify a little bit the internals - overall the documentation - by
eliminating unused specific cases. Use the INDIO_BUFFER_SOFTWARE mode by
default with kfifo buffers, which will basically mimic what all the "non
direct" modes do.

Cc: Benson Leung <bleung@chromium.org>
Cc: Guenter Roeck <groeck@chromium.org>
Cc: Jyoti Bhayana <jbhayana@google.com>
Cc: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Cc: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20220207143840.707510-13-miquel.raynal@bootlin.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 51570c9d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1567,7 +1567,6 @@ int adxl367_probe(struct device *dev, const struct adxl367_ops *ops,
		return ret;

	ret = devm_iio_kfifo_buffer_setup_ext(st->dev, indio_dev,
					      INDIO_BUFFER_SOFTWARE,
					      &adxl367_buffer_ops,
					      adxl367_fifo_attributes);
	if (ret)
+0 −1
Original line number Diff line number Diff line
@@ -1217,7 +1217,6 @@ int fxls8962af_core_probe(struct device *dev, struct regmap *regmap, int irq)
			return ret;

		ret = devm_iio_kfifo_buffer_setup(dev, indio_dev,
						  INDIO_BUFFER_SOFTWARE,
						  &fxls8962af_buffer_ops);
		if (ret)
			return ret;
+0 −1
Original line number Diff line number Diff line
@@ -1474,7 +1474,6 @@ static int sca3000_probe(struct spi_device *spi)
	indio_dev->modes = INDIO_DIRECT_MODE;

	ret = devm_iio_kfifo_buffer_setup(&spi->dev, indio_dev,
					  INDIO_BUFFER_SOFTWARE,
					  &sca3000_ring_setup_ops);
	if (ret)
		return ret;
+0 −1
Original line number Diff line number Diff line
@@ -113,7 +113,6 @@ static int ssp_accel_probe(struct platform_device *pdev)
	indio_dev->available_scan_masks = ssp_accel_scan_mask;

	ret = devm_iio_kfifo_buffer_setup(&pdev->dev, indio_dev,
					  INDIO_BUFFER_SOFTWARE,
					  &ssp_accel_buffer_ops);
	if (ret)
		return ret;
+0 −1
Original line number Diff line number Diff line
@@ -1027,7 +1027,6 @@ static int ina2xx_probe(struct i2c_client *client,
	indio_dev->name = id->name;

	ret = devm_iio_kfifo_buffer_setup(&client->dev, indio_dev,
					  INDIO_BUFFER_SOFTWARE,
					  &ina2xx_setup_ops);
	if (ret)
		return ret;
Loading