From: Andy Shevchenko Date: Tue, 24 Oct 2023 12:41:15 +0000 (+0300) Subject: serdev: Replace custom code with device_match_acpi_handle() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=64ebf8797249e792af2143eb9e4bd404d10a022e;p=linux.git serdev: Replace custom code with device_match_acpi_handle() Since driver core provides a generic device_match_acpi_handle() we may replace the custom code with it. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231024124115.3598090-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c index 6a1e75f98f166..a5fdaf5e148ef 100644 --- a/drivers/tty/serdev/core.c +++ b/drivers/tty/serdev/core.c @@ -665,7 +665,7 @@ static int acpi_serdev_check_resources(struct serdev_controller *ctrl, acpi_get_parent(adev->handle, &lookup.controller_handle); /* Make sure controller and ResourceSource handle match */ - if (ACPI_HANDLE(ctrl->dev.parent) != lookup.controller_handle) + if (!device_match_acpi_handle(ctrl->dev.parent, lookup.controller_handle)) return -ENODEV; return 0;