iio: imu: inv_mpu6050: Check ACPI companion directly
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 3 Feb 2022 15:59:19 +0000 (17:59 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 6 Feb 2022 15:27:33 +0000 (15:27 +0000)
commit1ef6ff6ef8d581ceb1512581f47be3f99f4f8571
treebc54bac9761ba73ca66fe513de61c8ef615134e0
parentc53c7740bdbd976f868ddcfaf73f63797617ed99
iio: imu: inv_mpu6050: Check ACPI companion directly

Instead of checking for ACPI handle followed by extracting a companion
device, do the latter first and use it for checks.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220203155920.18586-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c