Not always a ring so naming is missleading.
Also, kfifo_buf is probably first buffer to take out of staging and it
definitely isn't a ring.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
static const struct iio_ring_setup_ops adis16201_ring_setup_ops = {
.preenable = &iio_sw_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
};
int adis16201_configure_ring(struct iio_dev *indio_dev)
static const struct iio_ring_setup_ops adis16203_ring_setup_ops = {
.preenable = &iio_sw_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
};
int adis16203_configure_ring(struct iio_dev *indio_dev)
static const struct iio_ring_setup_ops adis16204_ring_setup_ops = {
.preenable = &iio_sw_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
};
int adis16204_configure_ring(struct iio_dev *indio_dev)
static const struct iio_ring_setup_ops adis16209_ring_setup_ops = {
.preenable = &iio_sw_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
};
int adis16209_configure_ring(struct iio_dev *indio_dev)
static const struct iio_ring_setup_ops adis16240_ring_setup_ops = {
.preenable = &iio_sw_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
};
int adis16240_configure_ring(struct iio_dev *indio_dev)
if (ret)
goto error_ret;
- return iio_triggered_ring_postenable(indio_dev);
+ return iio_triggered_buffer_postenable(indio_dev);
error_ret:
return ret;
}
u8 t;
int ret;
- ret = iio_triggered_ring_predisable(indio_dev);
+ ret = iio_triggered_buffer_predisable(indio_dev);
if (ret)
goto error_ret;
static const struct iio_ring_setup_ops ad7192_ring_setup_ops = {
.preenable = &ad7192_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
.postdisable = &ad7192_ring_postdisable,
};
static const struct iio_ring_setup_ops ad7298_ring_setup_ops = {
.preenable = &ad7298_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
};
int ad7298_register_ring_funcs_and_init(struct iio_dev *indio_dev)
static const struct iio_ring_setup_ops ad7476_ring_setup_ops = {
.preenable = &ad7476_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
};
int ad7476_register_ring_funcs_and_init(struct iio_dev *indio_dev)
static const struct iio_ring_setup_ops ad7606_ring_setup_ops = {
.preenable = &ad7606_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
};
int ad7606_register_ring_funcs_and_init(struct iio_dev *indio_dev)
static const struct iio_ring_setup_ops ad7793_ring_setup_ops = {
.preenable = &ad7793_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
.postdisable = &ad7793_ring_postdisable,
};
static const struct iio_ring_setup_ops ad7887_ring_setup_ops = {
.preenable = &ad7887_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
.postdisable = &ad7887_ring_postdisable,
};
static const struct iio_ring_setup_ops ad799x_buf_setup_ops = {
.preenable = &ad799x_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
};
int ad799x_register_ring_funcs_and_init(struct iio_dev *indio_dev)
}
static const struct iio_ring_setup_ops max1363_ring_setup_ops = {
- .postenable = &iio_triggered_ring_postenable,
+ .postenable = &iio_triggered_buffer_postenable,
.preenable = &max1363_ring_preenable,
- .predisable = &iio_triggered_ring_predisable,
+ .predisable = &iio_triggered_buffer_predisable,
};
int max1363_register_ring_funcs_and_init(struct iio_dev *indio_dev)
static const struct iio_ring_setup_ops adis16260_ring_setup_ops = {
.preenable = &iio_sw_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
};
int adis16260_configure_ring(struct iio_dev *indio_dev)
static const struct iio_ring_setup_ops adis16400_ring_setup_ops = {
.preenable = &iio_sw_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
};
int adis16400_configure_ring(struct iio_dev *indio_dev)
iio_put_trigger(dev_info->trig);
}
-int iio_triggered_ring_postenable(struct iio_dev *indio_dev)
+int iio_triggered_buffer_postenable(struct iio_dev *indio_dev)
{
return indio_dev->trig
? iio_trigger_attach_poll_func(indio_dev->trig,
indio_dev->pollfunc)
: 0;
}
-EXPORT_SYMBOL(iio_triggered_ring_postenable);
+EXPORT_SYMBOL(iio_triggered_buffer_postenable);
-int iio_triggered_ring_predisable(struct iio_dev *indio_dev)
+int iio_triggered_buffer_predisable(struct iio_dev *indio_dev)
{
return indio_dev->trig
? iio_trigger_dettach_poll_func(indio_dev->trig,
indio_dev->pollfunc)
: 0;
}
-EXPORT_SYMBOL(iio_triggered_ring_predisable);
+EXPORT_SYMBOL(iio_triggered_buffer_predisable);
static const struct iio_ring_setup_ops ade7758_ring_setup_ops = {
.preenable = &ade7758_ring_preenable,
- .postenable = &iio_triggered_ring_postenable,
- .predisable = &iio_triggered_ring_predisable,
+ .postenable = &iio_triggered_buffer_postenable,
+ .predisable = &iio_triggered_buffer_predisable,
};
void ade7758_unconfigure_ring(struct iio_dev *indio_dev)
* Two functions for common case where all that happens is a pollfunc
* is attached and detached from a trigger
*/
-int iio_triggered_ring_postenable(struct iio_dev *indio_dev);
-int iio_triggered_ring_predisable(struct iio_dev *indio_dev);
+int iio_triggered_buffer_postenable(struct iio_dev *indio_dev);
+int iio_triggered_buffer_predisable(struct iio_dev *indio_dev);