From 8c60c7e75de79fe429afea3c7300d010c091bc4e Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sun, 15 Sep 2013 17:50:00 +0100 Subject: iio: Remove unnecessary casts for iio_push_to_buffers() Now that iio_push_to_buffers() takes a void pointer for the data parameter we can remove those casts to u8*. Signed-off-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron --- drivers/iio/gyro/hid-sensor-gyro-3d.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/iio/gyro/hid-sensor-gyro-3d.c') 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; -- cgit v1.2.3