iio: Drop timestamp parameter from buffer store_to callback
Drop timestamp parameter from buffer store_to callback and subsequently from iio_push_to_buffer. The timestamp parameter is unused and it seems likely that it will stay unused in the future, so it should be safe to remove it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Родитель
a0d7bf7dd1
Коммит
ce56ade6ae
|
@ -198,7 +198,6 @@ static const struct iio_info accel_3d_info = {
|
||||||
static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
|
static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
|
||||||
{
|
{
|
||||||
struct iio_buffer *buffer = indio_dev->buffer;
|
struct iio_buffer *buffer = indio_dev->buffer;
|
||||||
s64 timestamp = iio_get_time_ns();
|
|
||||||
int datum_sz;
|
int datum_sz;
|
||||||
|
|
||||||
dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
|
dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
|
||||||
|
@ -212,7 +211,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
|
||||||
datum_sz);
|
datum_sz);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
iio_push_to_buffer(buffer, (u8 *)data, timestamp);
|
iio_push_to_buffer(buffer, (u8 *)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Callback handler to send event after all samples are received and captured */
|
/* Callback handler to send event after all samples are received and captured */
|
||||||
|
|
|
@ -99,7 +99,7 @@ static irqreturn_t ad7266_trigger_handler(int irq, void *p)
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
if (indio_dev->scan_timestamp)
|
if (indio_dev->scan_timestamp)
|
||||||
((s64 *)st->data)[1] = pf->timestamp;
|
((s64 *)st->data)[1] = pf->timestamp;
|
||||||
iio_push_to_buffer(buffer, (u8 *)st->data, pf->timestamp);
|
iio_push_to_buffer(buffer, (u8 *)st->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
iio_trigger_notify_done(indio_dev->trig);
|
iio_trigger_notify_done(indio_dev->trig);
|
||||||
|
|
|
@ -391,7 +391,7 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
iio_push_to_buffer(indio_dev->buffer, (uint8_t *)data, pf->timestamp);
|
iio_push_to_buffer(indio_dev->buffer, (uint8_t *)data);
|
||||||
|
|
||||||
iio_trigger_notify_done(indio_dev->trig);
|
iio_trigger_notify_done(indio_dev->trig);
|
||||||
sigma_delta->irq_dis = false;
|
sigma_delta->irq_dis = false;
|
||||||
|
|
|
@ -82,7 +82,7 @@ static irqreturn_t at91_adc_trigger_handler(int irq, void *p)
|
||||||
*timestamp = pf->timestamp;
|
*timestamp = pf->timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer->access->store_to(buffer, (u8 *)st->buffer, pf->timestamp);
|
buffer->access->store_to(buffer, (u8 *)st->buffer);
|
||||||
|
|
||||||
iio_trigger_notify_done(idev->trig);
|
iio_trigger_notify_done(idev->trig);
|
||||||
st->irq_enabled = true;
|
st->irq_enabled = true;
|
||||||
|
|
|
@ -198,7 +198,6 @@ static const struct iio_info gyro_3d_info = {
|
||||||
static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
|
static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
|
||||||
{
|
{
|
||||||
struct iio_buffer *buffer = indio_dev->buffer;
|
struct iio_buffer *buffer = indio_dev->buffer;
|
||||||
s64 timestamp = iio_get_time_ns();
|
|
||||||
int datum_sz;
|
int datum_sz;
|
||||||
|
|
||||||
dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
|
dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
|
||||||
|
@ -212,7 +211,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
|
||||||
datum_sz);
|
datum_sz);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
iio_push_to_buffer(buffer, (u8 *)data, timestamp);
|
iio_push_to_buffer(buffer, (u8 *)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Callback handler to send event after all samples are received and captured */
|
/* Callback handler to send event after all samples are received and captured */
|
||||||
|
|
|
@ -682,12 +682,11 @@ static unsigned char *iio_demux(struct iio_buffer *buffer,
|
||||||
return buffer->demux_bounce;
|
return buffer->demux_bounce;
|
||||||
}
|
}
|
||||||
|
|
||||||
int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data,
|
int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data)
|
||||||
s64 timestamp)
|
|
||||||
{
|
{
|
||||||
unsigned char *dataout = iio_demux(buffer, data);
|
unsigned char *dataout = iio_demux(buffer, data);
|
||||||
|
|
||||||
return buffer->access->store_to(buffer, dataout, timestamp);
|
return buffer->access->store_to(buffer, dataout);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(iio_push_to_buffer);
|
EXPORT_SYMBOL_GPL(iio_push_to_buffer);
|
||||||
|
|
||||||
|
|
|
@ -95,8 +95,7 @@ static int iio_set_length_kfifo(struct iio_buffer *r, int length)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int iio_store_to_kfifo(struct iio_buffer *r,
|
static int iio_store_to_kfifo(struct iio_buffer *r,
|
||||||
u8 *data,
|
u8 *data)
|
||||||
s64 timestamp)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct iio_kfifo *kf = iio_to_kfifo(r);
|
struct iio_kfifo *kf = iio_to_kfifo(r);
|
||||||
|
|
|
@ -187,7 +187,7 @@ static irqreturn_t adjd_s311_trigger_handler(int irq, void *p)
|
||||||
if (indio_dev->scan_timestamp)
|
if (indio_dev->scan_timestamp)
|
||||||
*(s64 *)((u8 *)data->buffer + ALIGN(len, sizeof(s64)))
|
*(s64 *)((u8 *)data->buffer + ALIGN(len, sizeof(s64)))
|
||||||
= time_ns;
|
= time_ns;
|
||||||
iio_push_to_buffer(buffer, (u8 *)data->buffer, time_ns);
|
iio_push_to_buffer(buffer, (u8 *)data->buffer);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
iio_trigger_notify_done(indio_dev->trig);
|
iio_trigger_notify_done(indio_dev->trig);
|
||||||
|
|
|
@ -177,7 +177,6 @@ static const struct iio_info als_info = {
|
||||||
static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
|
static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
|
||||||
{
|
{
|
||||||
struct iio_buffer *buffer = indio_dev->buffer;
|
struct iio_buffer *buffer = indio_dev->buffer;
|
||||||
s64 timestamp = iio_get_time_ns();
|
|
||||||
int datum_sz;
|
int datum_sz;
|
||||||
|
|
||||||
dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
|
dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
|
||||||
|
@ -191,7 +190,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
|
||||||
datum_sz);
|
datum_sz);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
iio_push_to_buffer(buffer, (u8 *)data, timestamp);
|
iio_push_to_buffer(buffer, (u8 *)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Callback handler to send event after all samples are received and captured */
|
/* Callback handler to send event after all samples are received and captured */
|
||||||
|
|
|
@ -199,7 +199,6 @@ static const struct iio_info magn_3d_info = {
|
||||||
static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
|
static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
|
||||||
{
|
{
|
||||||
struct iio_buffer *buffer = indio_dev->buffer;
|
struct iio_buffer *buffer = indio_dev->buffer;
|
||||||
s64 timestamp = iio_get_time_ns();
|
|
||||||
int datum_sz;
|
int datum_sz;
|
||||||
|
|
||||||
dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
|
dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
|
||||||
|
@ -213,7 +212,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
|
||||||
datum_sz);
|
datum_sz);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
iio_push_to_buffer(buffer, (u8 *)data, timestamp);
|
iio_push_to_buffer(buffer, (u8 *)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Callback handler to send event after all samples are received and captured */
|
/* Callback handler to send event after all samples are received and captured */
|
||||||
|
|
|
@ -82,7 +82,7 @@ static irqreturn_t adis16201_trigger_handler(int irq, void *p)
|
||||||
if (indio_dev->scan_timestamp)
|
if (indio_dev->scan_timestamp)
|
||||||
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
|
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
|
||||||
|
|
||||||
iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp);
|
iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
|
||||||
|
|
||||||
kfree(data);
|
kfree(data);
|
||||||
done:
|
done:
|
||||||
|
|
|
@ -81,7 +81,7 @@ static irqreturn_t adis16203_trigger_handler(int irq, void *p)
|
||||||
if (indio_dev->scan_timestamp)
|
if (indio_dev->scan_timestamp)
|
||||||
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
|
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
|
||||||
|
|
||||||
iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp);
|
iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
|
||||||
|
|
||||||
kfree(data);
|
kfree(data);
|
||||||
done:
|
done:
|
||||||
|
|
|
@ -78,7 +78,7 @@ static irqreturn_t adis16204_trigger_handler(int irq, void *p)
|
||||||
if (indio_dev->scan_timestamp)
|
if (indio_dev->scan_timestamp)
|
||||||
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
|
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
|
||||||
|
|
||||||
iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp);
|
iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
|
||||||
|
|
||||||
kfree(data);
|
kfree(data);
|
||||||
done:
|
done:
|
||||||
|
|
|
@ -78,7 +78,7 @@ static irqreturn_t adis16209_trigger_handler(int irq, void *p)
|
||||||
if (indio_dev->scan_timestamp)
|
if (indio_dev->scan_timestamp)
|
||||||
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
|
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
|
||||||
|
|
||||||
iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp);
|
iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
|
||||||
|
|
||||||
kfree(data);
|
kfree(data);
|
||||||
done:
|
done:
|
||||||
|
|
|
@ -76,7 +76,7 @@ static irqreturn_t adis16240_trigger_handler(int irq, void *p)
|
||||||
if (indio_dev->scan_timestamp)
|
if (indio_dev->scan_timestamp)
|
||||||
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
|
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
|
||||||
|
|
||||||
iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp);
|
iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
|
||||||
|
|
||||||
kfree(data);
|
kfree(data);
|
||||||
done:
|
done:
|
||||||
|
|
|
@ -152,7 +152,7 @@ static irqreturn_t lis3l02dq_trigger_handler(int irq, void *p)
|
||||||
if (indio_dev->scan_timestamp)
|
if (indio_dev->scan_timestamp)
|
||||||
*(s64 *)((u8 *)data + ALIGN(len, sizeof(s64)))
|
*(s64 *)((u8 *)data + ALIGN(len, sizeof(s64)))
|
||||||
= pf->timestamp;
|
= pf->timestamp;
|
||||||
iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp);
|
iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
|
||||||
|
|
||||||
kfree(data);
|
kfree(data);
|
||||||
done:
|
done:
|
||||||
|
|
|
@ -93,7 +93,7 @@ static irqreturn_t ad7298_trigger_handler(int irq, void *p)
|
||||||
indio_dev->masklength); i++)
|
indio_dev->masklength); i++)
|
||||||
buf[i] = be16_to_cpu(st->rx_buf[i]);
|
buf[i] = be16_to_cpu(st->rx_buf[i]);
|
||||||
|
|
||||||
iio_push_to_buffer(indio_dev->buffer, (u8 *)buf, time_ns);
|
iio_push_to_buffer(indio_dev->buffer, (u8 *)buf);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
iio_trigger_notify_done(indio_dev->trig);
|
iio_trigger_notify_done(indio_dev->trig);
|
||||||
|
|
|
@ -44,7 +44,7 @@ static irqreturn_t ad7476_trigger_handler(int irq, void *p)
|
||||||
memcpy(rxbuf + indio_dev->scan_bytes - sizeof(s64),
|
memcpy(rxbuf + indio_dev->scan_bytes - sizeof(s64),
|
||||||
&time_ns, sizeof(time_ns));
|
&time_ns, sizeof(time_ns));
|
||||||
|
|
||||||
iio_push_to_buffer(indio_dev->buffer, rxbuf, time_ns);
|
iio_push_to_buffer(indio_dev->buffer, rxbuf);
|
||||||
done:
|
done:
|
||||||
iio_trigger_notify_done(indio_dev->trig);
|
iio_trigger_notify_done(indio_dev->trig);
|
||||||
kfree(rxbuf);
|
kfree(rxbuf);
|
||||||
|
|
|
@ -83,7 +83,7 @@ static void ad7606_poll_bh_to_ring(struct work_struct *work_s)
|
||||||
if (indio_dev->scan_timestamp)
|
if (indio_dev->scan_timestamp)
|
||||||
*((s64 *)(buf + indio_dev->scan_bytes - sizeof(s64))) = time_ns;
|
*((s64 *)(buf + indio_dev->scan_bytes - sizeof(s64))) = time_ns;
|
||||||
|
|
||||||
iio_push_to_buffer(indio_dev->buffer, buf, time_ns);
|
iio_push_to_buffer(indio_dev->buffer, buf);
|
||||||
done:
|
done:
|
||||||
gpio_set_value(st->pdata->gpio_convst, 0);
|
gpio_set_value(st->pdata->gpio_convst, 0);
|
||||||
iio_trigger_notify_done(indio_dev->trig);
|
iio_trigger_notify_done(indio_dev->trig);
|
||||||
|
|
|
@ -95,7 +95,7 @@ static irqreturn_t ad7887_trigger_handler(int irq, void *p)
|
||||||
memcpy(buf + indio_dev->scan_bytes - sizeof(s64),
|
memcpy(buf + indio_dev->scan_bytes - sizeof(s64),
|
||||||
&time_ns, sizeof(time_ns));
|
&time_ns, sizeof(time_ns));
|
||||||
|
|
||||||
iio_push_to_buffer(indio_dev->buffer, buf, time_ns);
|
iio_push_to_buffer(indio_dev->buffer, buf);
|
||||||
done:
|
done:
|
||||||
kfree(buf);
|
kfree(buf);
|
||||||
iio_trigger_notify_done(indio_dev->trig);
|
iio_trigger_notify_done(indio_dev->trig);
|
||||||
|
|
|
@ -77,7 +77,7 @@ static irqreturn_t ad799x_trigger_handler(int irq, void *p)
|
||||||
memcpy(rxbuf + indio_dev->scan_bytes - sizeof(s64),
|
memcpy(rxbuf + indio_dev->scan_bytes - sizeof(s64),
|
||||||
&time_ns, sizeof(time_ns));
|
&time_ns, sizeof(time_ns));
|
||||||
|
|
||||||
iio_push_to_buffer(indio_dev->buffer, rxbuf, time_ns);
|
iio_push_to_buffer(indio_dev->buffer, rxbuf);
|
||||||
done:
|
done:
|
||||||
kfree(rxbuf);
|
kfree(rxbuf);
|
||||||
out:
|
out:
|
||||||
|
|
|
@ -80,7 +80,7 @@ static irqreturn_t max1363_trigger_handler(int irq, void *p)
|
||||||
|
|
||||||
if (indio_dev->scan_timestamp)
|
if (indio_dev->scan_timestamp)
|
||||||
memcpy(rxbuf + d_size - sizeof(s64), &time_ns, sizeof(time_ns));
|
memcpy(rxbuf + d_size - sizeof(s64), &time_ns, sizeof(time_ns));
|
||||||
iio_push_to_buffer(indio_dev->buffer, rxbuf, time_ns);
|
iio_push_to_buffer(indio_dev->buffer, rxbuf);
|
||||||
|
|
||||||
done_free:
|
done_free:
|
||||||
kfree(rxbuf);
|
kfree(rxbuf);
|
||||||
|
|
|
@ -256,7 +256,7 @@ static irqreturn_t mxs_lradc_trigger_handler(int irq, void *p)
|
||||||
*timestamp = pf->timestamp;
|
*timestamp = pf->timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
iio_push_to_buffer(buffer, (u8 *)lradc->buffer, pf->timestamp);
|
iio_push_to_buffer(buffer, (u8 *)lradc->buffer);
|
||||||
|
|
||||||
iio_trigger_notify_done(iio->trig);
|
iio_trigger_notify_done(iio->trig);
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ static irqreturn_t adis16260_trigger_handler(int irq, void *p)
|
||||||
if (indio_dev->scan_timestamp)
|
if (indio_dev->scan_timestamp)
|
||||||
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
|
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
|
||||||
|
|
||||||
iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp);
|
iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
|
||||||
|
|
||||||
kfree(data);
|
kfree(data);
|
||||||
done:
|
done:
|
||||||
|
|
|
@ -87,7 +87,7 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p)
|
||||||
if (indio_dev->scan_timestamp)
|
if (indio_dev->scan_timestamp)
|
||||||
*(s64 *)((u8 *)data + ALIGN(len, sizeof(s64)))
|
*(s64 *)((u8 *)data + ALIGN(len, sizeof(s64)))
|
||||||
= iio_get_time_ns();
|
= iio_get_time_ns();
|
||||||
iio_push_to_buffer(buffer, (u8 *)data, pf->timestamp);
|
iio_push_to_buffer(buffer, (u8 *)data);
|
||||||
|
|
||||||
kfree(data);
|
kfree(data);
|
||||||
|
|
||||||
|
|
|
@ -678,7 +678,7 @@ static void ad5933_work(struct work_struct *work)
|
||||||
buf[0] = be16_to_cpu(buf[0]);
|
buf[0] = be16_to_cpu(buf[0]);
|
||||||
}
|
}
|
||||||
/* save datum to the ring */
|
/* save datum to the ring */
|
||||||
iio_push_to_buffer(ring, (u8 *)buf, iio_get_time_ns());
|
iio_push_to_buffer(ring, (u8 *)buf);
|
||||||
} else {
|
} else {
|
||||||
/* no data available - try again later */
|
/* no data available - try again later */
|
||||||
schedule_delayed_work(&st->work, st->poll_time_jiffies);
|
schedule_delayed_work(&st->work, st->poll_time_jiffies);
|
||||||
|
|
|
@ -150,7 +150,7 @@ static irqreturn_t adis16400_trigger_handler(int irq, void *p)
|
||||||
/* Guaranteed to be aligned with 8 byte boundary */
|
/* Guaranteed to be aligned with 8 byte boundary */
|
||||||
if (ring->scan_timestamp)
|
if (ring->scan_timestamp)
|
||||||
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
|
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
|
||||||
iio_push_to_buffer(ring, (u8 *) data, pf->timestamp);
|
iio_push_to_buffer(ring, (u8 *) data);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
kfree(data);
|
kfree(data);
|
||||||
|
|
|
@ -73,7 +73,7 @@ static irqreturn_t ade7758_trigger_handler(int irq, void *p)
|
||||||
if (indio_dev->scan_timestamp)
|
if (indio_dev->scan_timestamp)
|
||||||
dat64[1] = pf->timestamp;
|
dat64[1] = pf->timestamp;
|
||||||
|
|
||||||
iio_push_to_buffer(indio_dev->buffer, (u8 *)dat64, pf->timestamp);
|
iio_push_to_buffer(indio_dev->buffer, (u8 *)dat64);
|
||||||
|
|
||||||
iio_trigger_notify_done(indio_dev->trig);
|
iio_trigger_notify_done(indio_dev->trig);
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ static inline void __iio_free_sw_ring_buffer(struct iio_sw_ring_buffer *ring)
|
||||||
/* Lock always held if their is a chance this may be called */
|
/* Lock always held if their is a chance this may be called */
|
||||||
/* Only one of these per ring may run concurrently - enforced by drivers */
|
/* Only one of these per ring may run concurrently - enforced by drivers */
|
||||||
static int iio_store_to_sw_ring(struct iio_sw_ring_buffer *ring,
|
static int iio_store_to_sw_ring(struct iio_sw_ring_buffer *ring,
|
||||||
unsigned char *data, s64 timestamp)
|
unsigned char *data)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
unsigned char *temp_ptr, *change_test_ptr;
|
unsigned char *temp_ptr, *change_test_ptr;
|
||||||
|
@ -256,11 +256,10 @@ error_ret:
|
||||||
}
|
}
|
||||||
|
|
||||||
static int iio_store_to_sw_rb(struct iio_buffer *r,
|
static int iio_store_to_sw_rb(struct iio_buffer *r,
|
||||||
u8 *data,
|
u8 *data)
|
||||||
s64 timestamp)
|
|
||||||
{
|
{
|
||||||
struct iio_sw_ring_buffer *ring = iio_to_sw_ring(r);
|
struct iio_sw_ring_buffer *ring = iio_to_sw_ring(r);
|
||||||
return iio_store_to_sw_ring(ring, data, timestamp);
|
return iio_store_to_sw_ring(ring, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int iio_request_update_sw_rb(struct iio_buffer *r)
|
static int iio_request_update_sw_rb(struct iio_buffer *r)
|
||||||
|
|
|
@ -36,7 +36,7 @@ struct iio_buffer;
|
||||||
* any of them not existing.
|
* any of them not existing.
|
||||||
**/
|
**/
|
||||||
struct iio_buffer_access_funcs {
|
struct iio_buffer_access_funcs {
|
||||||
int (*store_to)(struct iio_buffer *buffer, u8 *data, s64 timestamp);
|
int (*store_to)(struct iio_buffer *buffer, u8 *data);
|
||||||
int (*read_first_n)(struct iio_buffer *buffer,
|
int (*read_first_n)(struct iio_buffer *buffer,
|
||||||
size_t n,
|
size_t n,
|
||||||
char __user *buf);
|
char __user *buf);
|
||||||
|
@ -118,10 +118,8 @@ int iio_scan_mask_set(struct iio_dev *indio_dev,
|
||||||
* iio_push_to_buffer() - push to a registered buffer.
|
* iio_push_to_buffer() - push to a registered buffer.
|
||||||
* @buffer: IIO buffer structure for device
|
* @buffer: IIO buffer structure for device
|
||||||
* @data: the data to push to the buffer
|
* @data: the data to push to the buffer
|
||||||
* @timestamp: timestamp to associate with the data
|
|
||||||
*/
|
*/
|
||||||
int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data,
|
int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data);
|
||||||
s64 timestamp);
|
|
||||||
|
|
||||||
int iio_update_demux(struct iio_dev *indio_dev);
|
int iio_update_demux(struct iio_dev *indio_dev);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче