summaryrefslogtreecommitdiffstats
path: root/drivers/iio/accel/Kconfig
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2017-03-29 16:23:35 -0700
committerJonathan Cameron <jic23@kernel.org>2017-04-02 11:26:14 +0100
commit862d1d89ad9e5b117f1fb2a472cef6fc92c0007a (patch)
tree7bd3c10277ecd05b90b96cd6a237a4220c453e68 /drivers/iio/accel/Kconfig
parent7fd6592d1287046f61bfd3cda3c03cd35be490f7 (diff)
downloadtalos-obmc-linux-862d1d89ad9e5b117f1fb2a472cef6fc92c0007a.tar.gz
talos-obmc-linux-862d1d89ad9e5b117f1fb2a472cef6fc92c0007a.zip
iio: accel: hid-sensor-accel-3d: Fix duplicate scan index error
When both accel_3d and gravity sensor are present, iio_device_register() fails with "Duplicate scan index" error. The reason for this is setting of indio_dev->num_channels based on accel_3d channel for both gravity and accel-3d sensor. But number of channels are not same, so for gravity it is pointing to some invalid memory and getting scan_index to compare which may match. To fix this issue, set the indio_dev->num_channels correctly based on the sensor type. Fixes: 0e377f3b9ae9 ('iio: Add gravity sensor support') Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/accel/Kconfig')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud