diff options
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/accel/bma180.c | 2 | ||||
-rw-r--r-- | drivers/iio/accel/hid-sensor-accel-3d.c | 7 | ||||
-rw-r--r-- | drivers/iio/adc/ad7266.c | 2 | ||||
-rw-r--r-- | drivers/iio/adc/ad7298.c | 2 | ||||
-rw-r--r-- | drivers/iio/adc/ad7923.c | 2 | ||||
-rw-r--r-- | drivers/iio/adc/ad_sigma_delta.c | 2 | ||||
-rw-r--r-- | drivers/iio/adc/at91_adc.c | 2 | ||||
-rw-r--r-- | drivers/iio/gyro/hid-sensor-gyro-3d.c | 7 | ||||
-rw-r--r-- | drivers/iio/gyro/itg3200_buffer.c | 2 | ||||
-rw-r--r-- | drivers/iio/light/adjd_s311.c | 2 | ||||
-rw-r--r-- | drivers/iio/light/hid-sensor-als.c | 7 | ||||
-rw-r--r-- | drivers/iio/light/tcs3472.c | 2 | ||||
-rw-r--r-- | drivers/iio/magnetometer/hid-sensor-magn-3d.c | 7 |
13 files changed, 25 insertions, 21 deletions
diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index 12e32e6b4103..3eff2469dba9 100644 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c @@ -490,7 +490,7 @@ static irqreturn_t bma180_trigger_handler(int irq, void *p) } mutex_unlock(&data->mutex); - iio_push_to_buffers(indio_dev, (u8 *)data->buff); + iio_push_to_buffers(indio_dev, data->buff); err: iio_trigger_notify_done(indio_dev->trig); diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c index 46d22f3fb1a9..dcda17395c4e 100644 --- a/drivers/iio/accel/hid-sensor-accel-3d.c +++ b/drivers/iio/accel/hid-sensor-accel-3d.c @@ -182,10 +182,11 @@ static const struct iio_info accel_3d_info = { }; /* Function to push data to buffer */ -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, const void *data, + int len) { dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n"); - iio_push_to_buffers(indio_dev, (u8 *)data); + iio_push_to_buffers(indio_dev, data); } /* Callback handler to send event after all samples are received and captured */ @@ -200,7 +201,7 @@ static int accel_3d_proc_event(struct hid_sensor_hub_device *hsdev, accel_state->common_attributes.data_ready); if (accel_state->common_attributes.data_ready) hid_sensor_push_data(indio_dev, - (u8 *)accel_state->accel_val, + accel_state->accel_val, sizeof(accel_state->accel_val)); return 0; diff --git a/drivers/iio/adc/ad7266.c b/drivers/iio/adc/ad7266.c index 371731df1634..5bfed2398b70 100644 --- a/drivers/iio/adc/ad7266.c +++ b/drivers/iio/adc/ad7266.c @@ -98,7 +98,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_buffers(indio_dev, (u8 *)st->data); + iio_push_to_buffers(indio_dev, st->data); } iio_trigger_notify_done(indio_dev->trig); diff --git a/drivers/iio/adc/ad7298.c b/drivers/iio/adc/ad7298.c index 85d1481c312f..0812556c11ff 100644 --- a/drivers/iio/adc/ad7298.c +++ b/drivers/iio/adc/ad7298.c @@ -172,7 +172,7 @@ static irqreturn_t ad7298_trigger_handler(int irq, void *p) &time_ns, sizeof(time_ns)); } - iio_push_to_buffers(indio_dev, (u8 *)st->rx_buf); + iio_push_to_buffers(indio_dev, st->rx_buf); done: iio_trigger_notify_done(indio_dev->trig); diff --git a/drivers/iio/adc/ad7923.c b/drivers/iio/adc/ad7923.c index 4108dbb28c3d..7eb4cb5a7f0d 100644 --- a/drivers/iio/adc/ad7923.c +++ b/drivers/iio/adc/ad7923.c @@ -187,7 +187,7 @@ static irqreturn_t ad7923_trigger_handler(int irq, void *p) &time_ns, sizeof(time_ns)); } - iio_push_to_buffers(indio_dev, (u8 *)st->rx_buf); + iio_push_to_buffers(indio_dev, st->rx_buf); done: iio_trigger_notify_done(indio_dev->trig); diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c index f0d6335ae087..78d276f40c8e 100644 --- a/drivers/iio/adc/ad_sigma_delta.c +++ b/drivers/iio/adc/ad_sigma_delta.c @@ -391,7 +391,7 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p) break; } - iio_push_to_buffers(indio_dev, (uint8_t *)data); + iio_push_to_buffers(indio_dev, data); iio_trigger_notify_done(indio_dev->trig); sigma_delta->irq_dis = false; diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index 84be63bdf038..6da5ebb25502 100644 --- a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c @@ -89,7 +89,7 @@ static irqreturn_t at91_adc_trigger_handler(int irq, void *p) *timestamp = pf->timestamp; } - iio_push_to_buffers(idev, (u8 *)st->buffer); + iio_push_to_buffers(idev, st->buffer); iio_trigger_notify_done(idev->trig); diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c index c688d974d3e3..ea01c6bcfb56 100644 --- a/drivers/iio/gyro/hid-sensor-gyro-3d.c +++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c @@ -182,10 +182,11 @@ static const struct iio_info gyro_3d_info = { }; /* Function to push data to buffer */ -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, const void *data, + int len) { dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n"); - iio_push_to_buffers(indio_dev, (u8 *)data); + iio_push_to_buffers(indio_dev, data); } /* Callback handler to send event after all samples are received and captured */ @@ -200,7 +201,7 @@ static int gyro_3d_proc_event(struct hid_sensor_hub_device *hsdev, gyro_state->common_attributes.data_ready); if (gyro_state->common_attributes.data_ready) hid_sensor_push_data(indio_dev, - (u8 *)gyro_state->gyro_val, + gyro_state->gyro_val, sizeof(gyro_state->gyro_val)); return 0; diff --git a/drivers/iio/gyro/itg3200_buffer.c b/drivers/iio/gyro/itg3200_buffer.c index 6c43af9bb0a4..6b3c30118c48 100644 --- a/drivers/iio/gyro/itg3200_buffer.c +++ b/drivers/iio/gyro/itg3200_buffer.c @@ -59,7 +59,7 @@ static irqreturn_t itg3200_trigger_handler(int irq, void *p) memcpy(buf + indio_dev->scan_bytes - sizeof(s64), &pf->timestamp, sizeof(pf->timestamp)); - iio_push_to_buffers(indio_dev, (u8 *)buf); + iio_push_to_buffers(indio_dev, buf); iio_trigger_notify_done(indio_dev->trig); error_ret: diff --git a/drivers/iio/light/adjd_s311.c b/drivers/iio/light/adjd_s311.c index c0da351b1c2e..c9c8b002b27d 100644 --- a/drivers/iio/light/adjd_s311.c +++ b/drivers/iio/light/adjd_s311.c @@ -141,7 +141,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_buffers(indio_dev, (u8 *)data->buffer); + iio_push_to_buffers(indio_dev, data->buffer); done: iio_trigger_notify_done(indio_dev->trig); diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c index e59d00c3139c..fa6ae8cf89ea 100644 --- a/drivers/iio/light/hid-sensor-als.c +++ b/drivers/iio/light/hid-sensor-als.c @@ -161,10 +161,11 @@ static const struct iio_info als_info = { }; /* Function to push data to buffer */ -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, const void *data, + int len) { dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n"); - iio_push_to_buffers(indio_dev, (u8 *)data); + iio_push_to_buffers(indio_dev, data); } /* Callback handler to send event after all samples are received and captured */ @@ -179,7 +180,7 @@ static int als_proc_event(struct hid_sensor_hub_device *hsdev, als_state->common_attributes.data_ready); if (als_state->common_attributes.data_ready) hid_sensor_push_data(indio_dev, - (u8 *)&als_state->illum, + &als_state->illum, sizeof(als_state->illum)); return 0; diff --git a/drivers/iio/light/tcs3472.c b/drivers/iio/light/tcs3472.c index dc7d8234134f..7bf296943745 100644 --- a/drivers/iio/light/tcs3472.c +++ b/drivers/iio/light/tcs3472.c @@ -195,7 +195,7 @@ static irqreturn_t tcs3472_trigger_handler(int irq, void *p) if (indio_dev->scan_timestamp) *(s64 *)((u8 *)data->buffer + ALIGN(len, sizeof(s64))) = iio_get_time_ns(); - iio_push_to_buffers(indio_dev, (u8 *)data->buffer); + iio_push_to_buffers(indio_dev, data->buffer); done: iio_trigger_notify_done(indio_dev->trig); diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c index a98460b15e4b..2634920562fb 100644 --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c @@ -183,10 +183,11 @@ static const struct iio_info magn_3d_info = { }; /* Function to push data to buffer */ -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, const void *data, + int len) { dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n"); - iio_push_to_buffers(indio_dev, (u8 *)data); + iio_push_to_buffers(indio_dev, data); } /* Callback handler to send event after all samples are received and captured */ @@ -201,7 +202,7 @@ static int magn_3d_proc_event(struct hid_sensor_hub_device *hsdev, magn_state->common_attributes.data_ready); if (magn_state->common_attributes.data_ready) hid_sensor_push_data(indio_dev, - (u8 *)magn_state->magn_val, + magn_state->magn_val, sizeof(magn_state->magn_val)); return 0; |