|
@@ -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;
|