]> git.baikalelectronics.ru Git - kernel.git/commit
iio: inv_mpu6050: Cleanup hw_info mapping
authorCrestez Dan Leonard <leonard.crestez@intel.com>
Wed, 20 Apr 2016 13:15:09 +0000 (16:15 +0300)
committerJonathan Cameron <jic23@kernel.org>
Mon, 25 Apr 2016 18:38:52 +0000 (19:38 +0100)
commit374d1e7e443cc53aa8c1e6d8457bdd9102eac96f
treea6a5289eecb15eb0f25245044c679350fa055235
parent9bb91d84f69ac81fd991e32d5fa7986b8bffcca4
iio: inv_mpu6050: Cleanup hw_info mapping

The hw_info array was indexed by enum inv_devices chip_type despite the
fact that the enumeration had more members than the array and was
ordered differently.

The patch cleans this up and adds explicit chip_types to i2c/spi/acpi
IDs. It also adds some stricter checks inside the driver core.

This happened to work so far because the differences between the
supported models are very minor.

Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Acked-by: Ge Gao <ggao@invensense.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c