aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2024-05-10 20:49:52 +0000
committerMark Brown <[email protected]>2024-05-27 00:33:40 +0000
commit2d19ea9e8840a1a77b1d464b06e62dd9b0f21e0d (patch)
tree23f5774f3e6192f080f4209f091dcfd3e0938698 /drivers/spi/spi.c
parentspi: atmel-quadspi: Add missing check for clk_prepare (diff)
downloadkernel-2d19ea9e8840a1a77b1d464b06e62dd9b0f21e0d.tar.gz
kernel-2d19ea9e8840a1a77b1d464b06e62dd9b0f21e0d.zip
spi: 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 <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r--drivers/spi/spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index f94420858c22..26ef4e147681 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2729,7 +2729,7 @@ static int acpi_spi_add_resource(struct acpi_resource *ares, void *data)
return -ENODEV;
if (ctlr) {
- if (ACPI_HANDLE(ctlr->dev.parent) != parent_handle)
+ if (!device_match_acpi_handle(ctlr->dev.parent, parent_handle))
return -ENODEV;
} else {
struct acpi_device *adev;
@@ -2828,7 +2828,7 @@ struct spi_device *acpi_spi_device_alloc(struct spi_controller *ctlr,
if (!lookup.max_speed_hz &&
ACPI_SUCCESS(acpi_get_parent(adev->handle, &parent_handle)) &&
- ACPI_HANDLE(lookup.ctlr->dev.parent) == parent_handle) {
+ device_match_acpi_handle(lookup.ctlr->dev.parent, parent_handle)) {
/* Apple does not use _CRS but nested devices for SPI slaves */
acpi_spi_parse_apple_properties(adev, &lookup);
}