diff options
author | Reyad Attiyat <reyad.attiyat@gmail.com> | 2014-07-25 23:14:00 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-07-27 15:16:29 +0200 |
commit | 03d795589d4e5adf83af0623ac5bac93ae2ce2a9 (patch) | |
tree | b6115484552f7fb2e20b91814a6e8caec5140786 | |
parent | staging: gdm724x: fix misplaced open braces (diff) | |
download | linux-03d795589d4e5adf83af0623ac5bac93ae2ce2a9.tar.xz linux-03d795589d4e5adf83af0623ac5bac93ae2ce2a9.zip |
iio: hid-sensor-magn-3d: Fix build warning
Fix build warning, sizeof() called on dynamically
sized pointer, by removing the call and the dependent
function parameter. It is not needed or used in this
driver, when pushing values to an iio buffer.
Changes from v1
- Fix mistake in varible name
Signed-off-by: Reyad Attiyat <reyad.attiyat@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/magnetometer/hid-sensor-magn-3d.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c index 3ec777a8f64e..1e717c71c244 100644 --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c @@ -246,8 +246,7 @@ 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, const void *data, - int len) +static void hid_sensor_push_data(struct iio_dev *indio_dev, const void *data) { dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n"); iio_push_to_buffers(indio_dev, data); @@ -263,9 +262,7 @@ static int magn_3d_proc_event(struct hid_sensor_hub_device *hsdev, dev_dbg(&indio_dev->dev, "magn_3d_proc_event\n"); if (atomic_read(&magn_state->common_attributes.data_ready)) - hid_sensor_push_data(indio_dev, - magn_state->iio_vals, - sizeof(magn_state->iio_vals)); + hid_sensor_push_data(indio_dev, magn_state->iio_vals); return 0; } |