summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2026-07-14 20:53:43 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-07-21 15:37:50 +0200
commit4bff98d343e7450384352637d5b5d20f7ddc749a (patch)
tree41f4f1be3574ea40a25c1b39d2763f4cf50555de
parentad921e94ffe1e66df8b2deed01affdd5d8716dc6 (diff)
downloadlinux-next-4bff98d343e7450384352637d5b5d20f7ddc749a.tar.gz
linux-next-4bff98d343e7450384352637d5b5d20f7ddc749a.zip
i2c: acpi: Convert to use acpi_dev_is_video_device() helper
Replace open coded variant of acpi_dev_is_video_device() helper. Acked-by: Wolfram Sang <wsa@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260714185915.865396-5-andriy.shevchenko@linux.intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/i2c/i2c-core-acpi.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
index 28c0e4884a7f..4aec8aeea826 100644
--- a/drivers/i2c/i2c-core-acpi.c
+++ b/drivers/i2c/i2c-core-acpi.c
@@ -128,15 +128,6 @@ static int i2c_acpi_fill_info(struct acpi_resource *ares, void *data)
return 1;
}
-static const struct acpi_device_id i2c_acpi_ignored_device_ids[] = {
- /*
- * ACPI video acpi_devices, which are handled by the acpi-video driver
- * sometimes contain a SERIAL_TYPE_I2C ACPI resource, ignore these.
- */
- { ACPI_VIDEO_HID, 0 },
- {}
-};
-
struct i2c_acpi_irq_context {
int irq;
bool wake_capable;
@@ -155,7 +146,11 @@ static int i2c_acpi_do_lookup(struct acpi_device *adev,
if (!acpi_dev_ready_for_enumeration(adev))
return -ENODEV;
- if (acpi_match_device_ids(adev, i2c_acpi_ignored_device_ids) == 0)
+ /*
+ * ACPI video devices, which are handled by the acpi-video driver,
+ * sometimes contain a SERIAL_TYPE_I2C ACPI resource, ignore these.
+ */
+ if (acpi_dev_is_video_device(adev))
return -ENODEV;
memset(info, 0, sizeof(*info));