]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: imu: inv_mpu6050: Replace strange way of checking type of enumeration
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 24 Oct 2024 19:04:52 +0000 (22:04 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 28 Oct 2024 20:04:11 +0000 (20:04 +0000)
commit77005bc23dfca72e2466486e3b9c25a7e9136a22
treed3be8506f57474b6dfe9ab28329f2888b592ffee
parentd45b145d19b5ecf743031a76c77f62659c8b963a
iio: imu: inv_mpu6050: Replace strange way of checking type of enumeration

When device is enumerated via ACPI the respective device node is of
ACPI device type. Use that to check for ACPI enumeration, rather than
calling for full match which is O(n) vs. O(1) for the regular check.

Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241024191200.229894-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c