staging:iio: hid-sensors Use iio_push_to_buffer
Subsystems (7)
Jonathan Cameron
maintainerPATCH 1/1 staging:iio: hid-sensors Use iio_push_to_buffer
Consistently use iio_push_to_buffer instead of manually calling the buffers store_to callback.
These crossed with Lars-Peter's patch set doing every other case.
--- drivers/iio/accel/hid-sensor-accel-3d.c | 2 +- drivers/iio/gyro/hid-sensor-gyro-3d.c | 2 +- drivers/iio/light/hid-sensor-als.c | 2 +- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/iio/accel/hid-sensor-accel-3d.c +1 -1
@@ -212,7 +212,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) datum_sz);return ; } - buffer->access->store_to (buffer, (u8 *)data, timestamp); +iio_push_to_buffer (buffer, (u8 *)data, timestamp); }/* Callback handler to send event after all samples are received and captured */
drivers/iio/gyro/hid-sensor-gyro-3d.c +1 -1
@@ -212,7 +212,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) datum_sz);return ; } - buffer->access->store_to (buffer, (u8 *)data, timestamp); +iio_push_to_buffer (buffer, (u8 *)data, timestamp); }/* Callback handler to send event after all samples are received and captured */
drivers/iio/light/hid-sensor-als.c +1 -1
@@ -191,7 +191,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) datum_sz);return ; } - buffer->access->store_to (buffer, (u8 *)data, timestamp); +iio_push_to_buffer (buffer, (u8 *)data, timestamp); }/* Callback handler to send event after all samples are received and captured */
drivers/iio/magnetometer/hid-sensor-magn-3d.c +1 -1
@@ -213,7 +213,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) datum_sz);return ; } - buffer->access->store_to (buffer, (u8 *)data, timestamp); +iio_push_to_buffer (buffer, (u8 *)data, timestamp); }/* Callback handler to send event after all samples are received and captured */
Signature · 1 line
1.7.11.4
Jonathan Cameron
maintainerPATCH v2 1/1 iio: Drop timestamp parameter from buffer store_to callback
From: Lars-Peter Clausen <[email protected]>
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.
Amended by Jonathan Cameron to include hid-sensor drivers with which the original patch crossed in review.
--- drivers/iio/accel/hid-sensor-accel-3d.c | 3 +-- drivers/iio/adc/ad7266.c | 2 +- drivers/iio/adc/ad_sigma_delta.c | 2 +- drivers/iio/adc/at91_adc.c | 2 +- drivers/iio/gyro/hid-sensor-gyro-3d.c | 3 +-- drivers/iio/industrialio-buffer.c | 5 ++--- drivers/iio/kfifo_buf.c | 3 +-- drivers/iio/light/adjd_s311.c | 2 +- drivers/iio/light/hid-sensor-als.c | 3 +-- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 3 +-- drivers/staging/iio/accel/adis16201_ring.c | 2 +- drivers/staging/iio/accel/adis16203_ring.c | 2 +- drivers/staging/iio/accel/adis16204_ring.c | 2 +- drivers/staging/iio/accel/adis16209_ring.c | 2 +- drivers/staging/iio/accel/adis16240_ring.c | 2 +- drivers/staging/iio/accel/lis3l02dq_ring.c | 2 +- drivers/staging/iio/adc/ad7298_ring.c | 2 +- drivers/staging/iio/adc/ad7476_ring.c | 2 +- drivers/staging/iio/adc/ad7606_ring.c | 2 +- drivers/staging/iio/adc/ad7887_ring.c | 2 +- drivers/staging/iio/adc/ad799x_ring.c | 2 +- drivers/staging/iio/adc/max1363_ring.c | 2 +- drivers/staging/iio/adc/mxs-lradc.c | 2 +- drivers/staging/iio/gyro/adis16260_ring.c | 2 +- drivers/staging/iio/iio_simple_dummy_buffer.c | 2 +- drivers/staging/iio/impedance-analyzer/ad5933.c | 2 +- drivers/staging/iio/imu/adis16400_ring.c | 2 +- drivers/staging/iio/meter/ade7758_ring.c | 2 +- drivers/staging/iio/ring_sw.c | 7 +++---- include/linux/iio/buffer.h | 6 ++---- 30 files changed, 34 insertions(+), 43 deletions(-)
drivers/iio/accel/hid-sensor-accel-3d.c +1 -2
@@ -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) {struct iio_buffer *buffer = indio_dev->buffer; -s64 timestamp =iio_get_time_ns ();int datum_sz;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);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 */
drivers/iio/adc/ad7266.c +1 -1
@@ -99,7 +99,7 @@ static irqreturn_t ad7266_trigger_handler(int irq, void *p)if (ret ==0 ) {if (indio_dev->scan_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);
drivers/iio/adc/ad_sigma_delta.c +1 -1
@@ -391,7 +391,7 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)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); sigma_delta->irq_dis = false;
drivers/iio/adc/at91_adc.c +1 -1
@@ -82,7 +82,7 @@ static irqreturn_t at91_adc_trigger_handler(int irq, void *p) *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); st->irq_enabled = true;
drivers/iio/gyro/hid-sensor-gyro-3d.c +1 -2
@@ -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) {struct iio_buffer *buffer = indio_dev->buffer; -s64 timestamp =iio_get_time_ns ();int datum_sz;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);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 */
drivers/iio/industrialio-buffer.c +2 -3
@@ -682,12 +682,11 @@ static unsigned char *iio_demux(struct iio_buffer *buffer,return buffer->demux_bounce; } -int iio_push_to_buffer (struct iio_buffer *buffer,unsigned char *data, -s64 timestamp) +int iio_push_to_buffer (struct iio_buffer *buffer,unsigned char *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);
drivers/iio/kfifo_buf.c +1 -2
@@ -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, -u8 *data, -s64 timestamp) +u8 *data) {int ret;struct iio_kfifo *kf =iio_to_kfifo (r);
drivers/iio/light/adjd_s311.c +1 -1
@@ -187,7 +187,7 @@ static irqreturn_t adjd_s311_trigger_handler(int irq, void *p)if (indio_dev->scan_timestamp) *(s64 *)((u8 *)data->buffer +ALIGN (len,sizeof (s64))) = time_ns; -iio_push_to_buffer (buffer, (u8 *)data->buffer, time_ns); +iio_push_to_buffer (buffer, (u8 *)data->buffer); done:iio_trigger_notify_done (indio_dev->trig);
drivers/iio/light/hid-sensor-als.c +1 -2
@@ -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) {struct iio_buffer *buffer = indio_dev->buffer; -s64 timestamp =iio_get_time_ns ();int datum_sz;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);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 */
drivers/iio/magnetometer/hid-sensor-magn-3d.c +1 -2
@@ -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) {struct iio_buffer *buffer = indio_dev->buffer; -s64 timestamp =iio_get_time_ns ();int datum_sz;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);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 */
drivers/staging/iio/accel/adis16201_ring.c +1 -1
@@ -82,7 +82,7 @@ static irqreturn_t adis16201_trigger_handler(int irq, void *p)if (indio_dev->scan_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); done:
drivers/staging/iio/accel/adis16203_ring.c +1 -1
@@ -81,7 +81,7 @@ static irqreturn_t adis16203_trigger_handler(int irq, void *p)if (indio_dev->scan_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); done:
drivers/staging/iio/accel/adis16204_ring.c +1 -1
@@ -78,7 +78,7 @@ static irqreturn_t adis16204_trigger_handler(int irq, void *p)if (indio_dev->scan_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); done:
drivers/staging/iio/accel/adis16209_ring.c +1 -1
@@ -78,7 +78,7 @@ static irqreturn_t adis16209_trigger_handler(int irq, void *p)if (indio_dev->scan_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); done:
drivers/staging/iio/accel/adis16240_ring.c +1 -1
@@ -76,7 +76,7 @@ static irqreturn_t adis16240_trigger_handler(int irq, void *p)if (indio_dev->scan_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); done:
drivers/staging/iio/accel/lis3l02dq_ring.c +1 -1
@@ -152,7 +152,7 @@ static irqreturn_t lis3l02dq_trigger_handler(int irq, void *p)if (indio_dev->scan_timestamp) *(s64 *)((u8 *)data +ALIGN (len,sizeof (s64))) = pf->timestamp; -iio_push_to_buffer (indio_dev->buffer, (u8 *)data, pf->timestamp); +iio_push_to_buffer (indio_dev->buffer, (u8 *)data);kfree (data); done:
drivers/staging/iio/adc/ad7298_ring.c +1 -1
@@ -93,7 +93,7 @@ static irqreturn_t ad7298_trigger_handler(int irq, void *p) indio_dev->masklength); 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:iio_trigger_notify_done (indio_dev->trig);
drivers/staging/iio/adc/ad7476_ring.c +1 -1
@@ -44,7 +44,7 @@ static irqreturn_t ad7476_trigger_handler(int irq, void *p)memcpy (rxbuf + indio_dev->scan_bytes -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:iio_trigger_notify_done (indio_dev->trig);kfree (rxbuf);
drivers/staging/iio/adc/ad7606_ring.c +1 -1
@@ -83,7 +83,7 @@ static void ad7606_poll_bh_to_ring(struct work_struct *work_s)if (indio_dev->scan_timestamp) *((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:gpio_set_value (st->pdata->gpio_convst,0 );iio_trigger_notify_done (indio_dev->trig);
drivers/staging/iio/adc/ad7887_ring.c +1 -1
@@ -95,7 +95,7 @@ static irqreturn_t ad7887_trigger_handler(int irq, void *p)memcpy (buf + indio_dev->scan_bytes -sizeof (s64), &time_ns,sizeof (time_ns)); -iio_push_to_buffer (indio_dev->buffer, buf, time_ns); +iio_push_to_buffer (indio_dev->buffer, buf); done:kfree (buf);iio_trigger_notify_done (indio_dev->trig);
drivers/staging/iio/adc/ad799x_ring.c +1 -1
@@ -77,7 +77,7 @@ static irqreturn_t ad799x_trigger_handler(int irq, void *p)memcpy (rxbuf + indio_dev->scan_bytes -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:kfree (rxbuf); out:
drivers/staging/iio/adc/max1363_ring.c +1 -1
@@ -80,7 +80,7 @@ static irqreturn_t max1363_trigger_handler(int irq, void *p)if (indio_dev->scan_timestamp)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:kfree (rxbuf);
drivers/staging/iio/adc/mxs-lradc.c +1 -1
@@ -256,7 +256,7 @@ static irqreturn_t mxs_lradc_trigger_handler(int irq, void *p) *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);
drivers/staging/iio/gyro/adis16260_ring.c +1 -1
@@ -81,7 +81,7 @@ static irqreturn_t adis16260_trigger_handler(int irq, void *p)if (indio_dev->scan_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); done:
drivers/staging/iio/iio_simple_dummy_buffer.c +1 -1
@@ -87,7 +87,7 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p)if (indio_dev->scan_timestamp) *(s64 *)((u8 *)data +ALIGN (len,sizeof (s64))) =iio_get_time_ns (); -iio_push_to_buffer (buffer, (u8 *)data, pf->timestamp); +iio_push_to_buffer (buffer, (u8 *)data);kfree (data);
drivers/staging/iio/impedance-analyzer/ad5933.c +1 -1
@@ -678,7 +678,7 @@ static void ad5933_work(struct work_struct *work) buf[0 ] =be16_to_cpu (buf[0 ]); }/* save datum to the ring */ -iio_push_to_buffer (ring, (u8 *)buf,iio_get_time_ns ()); +iio_push_to_buffer (ring, (u8 *)buf); }else {/* no data available - try again later */ schedule_delayed_work (&st->work, st->poll_time_jiffies);
drivers/staging/iio/imu/adis16400_ring.c +1 -1
@@ -150,7 +150,7 @@ static irqreturn_t adis16400_trigger_handler(int irq, void *p)/* Guaranteed to be aligned with 8 byte boundary */ if (ring->scan_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:kfree (data);
drivers/staging/iio/meter/ade7758_ring.c +1 -1
@@ -73,7 +73,7 @@ static irqreturn_t ade7758_trigger_handler(int irq, void *p)if (indio_dev->scan_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);
drivers/staging/iio/ring_sw.c +3 -4
@@ -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 */ /* 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, -unsigned char *data,s64 timestamp) +unsigned char *data) {int ret =0 ;unsigned char *temp_ptr, *change_test_ptr;
@@ -256,11 +256,10 @@ error_ret: }static int iio_store_to_sw_rb (struct iio_buffer *r, -u8 *data, -s64 timestamp) +u8 *data) {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)
include/linux/iio/buffer.h +2 -4
@@ -36,7 +36,7 @@ struct iio_buffer;* any of them not existing. **/ 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,size_t n,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. * @buffer: IIO buffer structure for device * @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, -s64 timestamp); +int iio_push_to_buffer (struct iio_buffer *buffer,unsigned char *data);int iio_update_demux (struct iio_dev *indio_dev);
Signature · 1 line
1.7.11.4
Tested and works for me. You can add my ACK.
-----Original Message-----
From: J.I. Cameron [mailto:[email protected]] On Behalf Of Jonathan Ca= meron
Sent: Thursday, September 06, 2012 2:20 PM
To: [email protected]
Cc: [email protected]; Pandruvada, Srinivas; Jonathan Cameron
Subject: [PATCH] staging:iio: hid-sensors Use iio_push_to_buffer
Consistently use iio_push_to_buffer instead of manually calling the buffers=
store_to callback.
These crossed with Lars-Peter's patch set doing every other case.
--- drivers/iio/accel/hid-sensor-accel-3d.c | 2 +- drivers/iio/gyro/hid-sensor-gyro-3d.c | 2 +- drivers/iio/light/hid-sensor-als.c | 2 +- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/iio/accel/hi= renamed from drivers/iio/accel/hid-sensor-accel-3d.c +0 -0
d-sensor-accel-3d.c
index 33aa97c..c593eb23 100644
drivers/iio/accel/hid-sensor-accel-3d.c +0 -0
@@ -212,7 +212,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_=
dev, u8 *data, int len)
datum_sz);
return;
}
- buffer->access->store_to(buffer, (u8 *)data, timestamp);
+ iio_push_to_buffer(buffer, (u8 *)data, timestamp);
}
=20
/* Callback handler to send event after all samples are received and captu=
red */ diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyr= o/hid-sensor-gyro-3d.c
index 50ec09b..94a4740 100644
drivers/iio/gyro/hid-sensor-gyro-3d.c +0 -0
@@ -212,7 +212,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_=
dev, u8 *data, int len)
datum_sz);
return;
}
- buffer->access->store_to(buffer, (u8 *)data, timestamp);
+ iio_push_to_buffer(buffer, (u8 *)data, timestamp);
}
=20
/* Callback handler to send event after all samples are received and captu=
red */ diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/= hid-sensor-als.c
index 2cff7d5..b3c8e91 100644
drivers/iio/light/hid-sensor-als.c +0 -0
@@ -191,7 +191,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_=
dev, u8 *data, int len)
datum_sz);
return;
}
- buffer->access->store_to(buffer, (u8 *)data, timestamp);
+ iio_push_to_buffer(buffer, (u8 *)data, timestamp);
}
=20
/* Callback handler to send event after all samples are received and captu=
red */ diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers= /iio/magnetometer/hid-sensor-magn-3d.c
index 07591f4..397704e 100644
drivers/iio/magnetometer/hid-sensor-magn-3d.c +0 -0
@@ -213,7 +213,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_=
dev, u8 *data, int len)
datum_sz);
return;
}
- buffer->access->store_to(buffer, (u8 *)data, timestamp);
+ iio_push_to_buffer(buffer, (u8 *)data, timestamp);
}
=20
/* Callback handler to send event after all samples are received and captu=
red */
--
1.7.11.4
Quoted 4 lines · Jonathan Cameron
Consistently use
iio_push_to_bufferinstead of manually calling the buffersstore_tocallback.These crossed with Lars-Peter's patch set doing every other case.
Actually I only did this for drivers/staging/iio, the at91_adc driver in drivers/iio still uses the store_to callback as well, might make sense to convert it as well in this patch.
Quoted 61 lines
Signed-off-by Jonathan Cameron <[email protected]>--- drivers/iio/accel/hid-sensor-accel-3d.c | 2 +- drivers/iio/gyro/hid-sensor-gyro-3d.c | 2 +- drivers/iio/light/hid-sensor-als.c | 2 +- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)drivers/iio/accel/hid-sensor-accel-3d.c +1
-1@@ -212,7 +212,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) datum_sz);return ; } - buffer->access->store_to (buffer, (u8 *)data, timestamp); +iio_push_to_buffer (buffer, (u8 *)data, timestamp); }/* Callback handler to send event after all samples are received and captured */ drivers/iio/gyro/hid-sensor-gyro-3d.c +1
-1@@ -212,7 +212,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) datum_sz);return ; } - buffer->access->store_to (buffer, (u8 *)data, timestamp); +iio_push_to_buffer (buffer, (u8 *)data, timestamp); }/* Callback handler to send event after all samples are received and captured */ drivers/iio/light/hid-sensor-als.c +1
-1@@ -191,7 +191,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) datum_sz);return ; } - buffer->access->store_to (buffer, (u8 *)data, timestamp); +iio_push_to_buffer (buffer, (u8 *)data, timestamp); }/* Callback handler to send event after all samples are received and captured */ drivers/iio/magnetometer/hid-sensor-magn-3d.c +1
-1@@ -213,7 +213,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) datum_sz);return ; } - buffer->access->store_to (buffer, (u8 *)data, timestamp); +iio_push_to_buffer (buffer, (u8 *)data, timestamp); }/* Callback handler to send event after all samples are received and captured */
Quoted 8 lines · Lars-Peter Clausen
Quoted 4 lines · Jonathan Cameron
Consistently use
iio_push_to_bufferinstead of manually calling the buffersstore_tocallback.These crossed with Lars-Peter's patch set doing every other case.
Actually I only did this for
drivers/staging/iio, theat91_adcdriver indrivers/iiostill uses thestore_tocallback as well, might make sense to convert it as well in this patch.
Your second patch did cover the dropping of the timestamp so I'm happy
to let this one driver go briefly in the interests of not waiting for an ack before pushing these out. Will send out a suitable patch for that one later.
Quoted 65 lines
Quoted 53 lines
Signed-off-by Jonathan Cameron <[email protected]>--- drivers/iio/accel/hid-sensor-accel-3d.c | 2 +- drivers/iio/gyro/hid-sensor-gyro-3d.c | 2 +- drivers/iio/light/hid-sensor-als.c | 2 +- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)drivers/iio/accel/hid-sensor-accel-3d.c +1
-1@@ -212,7 +212,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) datum_sz);return ; } - buffer->access->store_to (buffer, (u8 *)data, timestamp); +iio_push_to_buffer (buffer, (u8 *)data, timestamp); }/* Callback handler to send event after all samples are received and captured */ drivers/iio/gyro/hid-sensor-gyro-3d.c +1
-1@@ -212,7 +212,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) datum_sz);return ; } - buffer->access->store_to (buffer, (u8 *)data, timestamp); +iio_push_to_buffer (buffer, (u8 *)data, timestamp); }/* Callback handler to send event after all samples are received and captured */ drivers/iio/light/hid-sensor-als.c +1
-1@@ -191,7 +191,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) datum_sz);return ; } - buffer->access->store_to (buffer, (u8 *)data, timestamp); +iio_push_to_buffer (buffer, (u8 *)data, timestamp); }/* Callback handler to send event after all samples are received and captured */ drivers/iio/magnetometer/hid-sensor-magn-3d.c +0
-0drivers/iio/magnetometer/hid-sensor-magn-3d.c static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) · line 219
Quoted 8 lines
drivers/iio/magnetometer/hid-sensor-magn-3d.c +1
-1@@ -213,7 +213,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) datum_sz);return ; } - buffer->access->store_to (buffer, (u8 *)data, timestamp); +iio_push_to_buffer (buffer, (u8 *)data, timestamp); }/* Callback handler to send event after all samples are received and captured */ --
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html