aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/magnetometer/hid-sensor-magn-3d.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-09-15 12:50:00 -0400
committerJonathan Cameron <jic23@kernel.org>2013-09-15 14:05:07 -0400
commit8c60c7e75de79fe429afea3c7300d010c091bc4e (patch)
tree81aa0ec318da5d305f06f7944017732a7f63dd5b /drivers/iio/magnetometer/hid-sensor-magn-3d.c
parent5d65d92045cb7d3b2c45020c0e62d6d1c1d34f37 (diff)
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 <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/magnetometer/hid-sensor-magn-3d.c')
-rw-r--r--drivers/iio/magnetometer/hid-sensor-magn-3d.c7
1 files changed, 4 insertions, 3 deletions
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 = {
183}; 183};
184 184
185/* Function to push data to buffer */ 185/* Function to push data to buffer */
186static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) 186static void hid_sensor_push_data(struct iio_dev *indio_dev, const void *data,
187 int len)
187{ 188{
188 dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n"); 189 dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
189 iio_push_to_buffers(indio_dev, (u8 *)data); 190 iio_push_to_buffers(indio_dev, data);
190} 191}
191 192
192/* Callback handler to send event after all samples are received and captured */ 193/* 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,
201 magn_state->common_attributes.data_ready); 202 magn_state->common_attributes.data_ready);
202 if (magn_state->common_attributes.data_ready) 203 if (magn_state->common_attributes.data_ready)
203 hid_sensor_push_data(indio_dev, 204 hid_sensor_push_data(indio_dev,
204 (u8 *)magn_state->magn_val, 205 magn_state->magn_val,
205 sizeof(magn_state->magn_val)); 206 sizeof(magn_state->magn_val));
206 207
207 return 0; 208 return 0;