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

Commit b26a2188 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman
Browse files

staging:iio:buffering remove unused parameter dead_offset from read_last_n in...


staging:iio:buffering remove unused parameter dead_offset from read_last_n in all buffer implementations.

This element has been usused by the core for quite some time.  sca3000 set it none the less
until the rewrite in the previous patch (and hence didn't work).

Signed-off-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 25888dc5
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -79,16 +79,13 @@ error_ret:
 * @r:			the ring
 * @count:		number of samples to try and pull
 * @data:		output the actual samples pulled from the hw ring
 * @dead_offset:	cheating a bit here: Set to 1 so as to allow for the
 *			leading byte used in bus comms.
 *
 * Currently does not provide timestamps.  As the hardware doesn't add them they
 * can only be inferred approximately from ring buffer events such as 50% full
 * and knowledge of when buffer was last emptied.  This is left to userspace.
 **/
static int sca3000_read_first_n_hw_rb(struct iio_ring_buffer *r,
				      size_t count, char __user *buf,
				      int *dead_offset)
				      size_t count, char __user *buf)
{
	struct iio_hw_ring_buffer *hw_ring = iio_to_hw_ring_buf(r);
	struct iio_dev *indio_dev = hw_ring->private;
+2 −2
Original line number Diff line number Diff line
@@ -71,12 +71,12 @@ static ssize_t iio_ring_read_first_n_outer(struct file *filp, char __user *buf,
				  size_t n, loff_t *f_ps)
{
	struct iio_ring_buffer *rb = filp->private_data;
	int ret, dead_offset;
	int ret;

	/* rip lots must exist. */
	if (!rb->access.read_first_n)
		return -EINVAL;
	ret = rb->access.read_first_n(rb, n, buf, &dead_offset);
	ret = rb->access.read_first_n(rb, n, buf);

	return ret;
}
+1 −2
Original line number Diff line number Diff line
@@ -182,12 +182,11 @@ int iio_store_to_kfifo(struct iio_ring_buffer *r, u8 *data, s64 timestamp)
EXPORT_SYMBOL(iio_store_to_kfifo);

int iio_read_first_n_kfifo(struct iio_ring_buffer *r,
			   size_t n, char __user *buf, int *deadoffset)
			   size_t n, char __user *buf)
{
	int ret, copied;
	struct iio_kfifo *kf = iio_to_kfifo(r);

	*deadoffset = 0;
	ret = kfifo_to_user(&kf->kf, buf, r->bytes_per_datum*n, &copied);

	return copied;
+1 −2
Original line number Diff line number Diff line
@@ -23,8 +23,7 @@ void iio_unmark_kfifo_in_use(struct iio_ring_buffer *r);
int iio_store_to_kfifo(struct iio_ring_buffer *r, u8 *data, s64 timestamp);
int iio_read_first_n_kfifo(struct iio_ring_buffer *r,
			   size_t n,
			   char __user *buf,
			   int *dead_offset);
			   char __user *buf);

int iio_request_update_kfifo(struct iio_ring_buffer *r);
int iio_mark_update_needed_kfifo(struct iio_ring_buffer *r);
+1 −2
Original line number Diff line number Diff line
@@ -50,8 +50,7 @@ struct iio_ring_access_funcs {
	int (*read_last)(struct iio_ring_buffer *ring, u8 *data);
	int (*read_first_n)(struct iio_ring_buffer *ring,
			    size_t n,
			    char __user *buf,
			    int *dead_offset);
			    char __user *buf);

	int (*mark_param_change)(struct iio_ring_buffer *ring);
	int (*request_update)(struct iio_ring_buffer *ring);
Loading