From: Andy Shevchenko Date: Thu, 24 Oct 2024 19:04:51 +0000 (+0300) Subject: iio: adc: pac1934: Replace strange way of checking type of enumeration X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d45b145d19b5ecf743031a76c77f62659c8b963a;p=users%2Fjedix%2Flinux-maple.git iio: adc: pac1934: 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. Reviewed-by: Hans de Goede Reviewed-by: Marius Cristea Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20241024191200.229894-3-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/pac1934.c b/drivers/iio/adc/pac1934.c index 7ef249d832866..20802b7f49ea8 100644 --- a/drivers/iio/adc/pac1934.c +++ b/drivers/iio/adc/pac1934.c @@ -1507,7 +1507,7 @@ static int pac1934_probe(struct i2c_client *client) indio_dev->name = pac1934_chip_config[ret].name; } - if (acpi_match_device(dev->driver->acpi_match_table, dev)) + if (is_acpi_device_node(dev_fwnode(dev))) ret = pac1934_acpi_parse_channel_config(client, info); else /*