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

Commit 7e632344 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Greg Kroah-Hartman
Browse files

staging:iio: Setup buffer access functions when allocating the buffer



Setup the buffer access functions in the buffer allocate function. There is no
need to let each driver handle this on its own.

Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Acked-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 54461c30
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -115,9 +115,7 @@ int adis16201_configure_ring(struct iio_dev *indio_dev)
		return ret;
	}
	indio_dev->buffer = ring;
	/* Effectively select the ring buffer implementation */
	ring->scan_timestamp = true;
	ring->access = &ring_sw_access_funcs;
	indio_dev->setup_ops = &adis16201_ring_setup_ops;

	indio_dev->pollfunc = iio_alloc_pollfunc(&iio_pollfunc_store_time,
+0 −2
Original line number Diff line number Diff line
@@ -117,9 +117,7 @@ int adis16203_configure_ring(struct iio_dev *indio_dev)
		return ret;
	}
	indio_dev->buffer = ring;
	/* Effectively select the ring buffer implementation */
	ring->scan_timestamp = true;
	ring->access = &ring_sw_access_funcs;
	indio_dev->setup_ops = &adis16203_ring_setup_ops;

	indio_dev->pollfunc = iio_alloc_pollfunc(&iio_pollfunc_store_time,
+0 −2
Original line number Diff line number Diff line
@@ -112,8 +112,6 @@ int adis16204_configure_ring(struct iio_dev *indio_dev)
		return ret;
	}
	indio_dev->buffer = ring;
	/* Effectively select the ring buffer implementation */
	ring->access = &ring_sw_access_funcs;
	ring->scan_timestamp = true;
	indio_dev->setup_ops = &adis16204_ring_setup_ops;

+0 −2
Original line number Diff line number Diff line
@@ -113,8 +113,6 @@ int adis16209_configure_ring(struct iio_dev *indio_dev)
		return ret;
	}
	indio_dev->buffer = ring;
	/* Effectively select the ring buffer implementation */
	ring->access = &ring_sw_access_funcs;
	ring->scan_timestamp = true;
	indio_dev->setup_ops = &adis16209_ring_setup_ops;

+0 −2
Original line number Diff line number Diff line
@@ -110,8 +110,6 @@ int adis16240_configure_ring(struct iio_dev *indio_dev)
		return ret;
	}
	indio_dev->buffer = ring;
	/* Effectively select the ring buffer implementation */
	ring->access = &ring_sw_access_funcs;
	ring->scan_timestamp = true;
	indio_dev->setup_ops = &adis16240_ring_setup_ops;

Loading