]> git.baikalelectronics.ru Git - kernel.git/commit
iio: imu: mpu6050: Fix name/chip_id when using ACPI
authorDaniel Baluta <daniel.baluta@intel.com>
Thu, 17 Mar 2016 16:32:44 +0000 (18:32 +0200)
committerJonathan Cameron <jic23@kernel.org>
Wed, 4 May 2016 07:44:27 +0000 (08:44 +0100)
commit0af152066c10f9a02098af5adc690b8ab2a4e448
tree31e88fad600270dfabe6f04d2557f141035d8988
parentb89c6534d58ba09a0f100a0f0f854dfe0cf6282a
iio: imu: mpu6050: Fix name/chip_id when using ACPI

When using ACPI, id is NULL and the current code automatically
defaults name to NULL and chip id to 0. We should instead use
the data provided in the ACPI device table.

Fixes: c816d9e7a57b ("iio: imu: mpu6050: fix possible NULL dereferences")
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Reviewed-By: Matt Ranostay <matt.ranostay@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c