[v1,3/3] serdev: Replace custom code with device_match_acpi_handle()

Message ID 20231024124115.3598090-4-andriy.shevchenko@linux.intel.com
State New
Headers
Series serdev: Update a few places to use new APIs |

Commit Message

Andy Shevchenko Oct. 24, 2023, 12:41 p.m. UTC
  Since driver core provides a generic device_match_acpi_handle()
we may replace the custom code with it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/tty/serdev/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index 6a1e75f98f16..a5fdaf5e148e 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;