From 259b8366fdd729413a0de399e85e49154e71de57 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Fri, 9 Jun 2023 18:49:00 +0300 Subject: [PATCH] ata: ahci_platform: Make code agnostic to OF/ACPI With the help of a new device_is_compatible() make the driver code agnostic to the OF/ACPI. This makes it neater. As a side effect the header inclusions is corrected (seems mod_devicetable.h was implicitly included). Signed-off-by: Andy Shevchenko Reviewed-by: Serge Semin Reviewed-by: Sakari Ailus Message-ID: <20230609154900.43024-4-andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman --- drivers/ata/ahci_platform.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index 299ee686ac49a..c18054333f7c9 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -9,14 +9,14 @@ */ #include +#include #include #include #include -#include #include +#include #include #include -#include #include #include "ahci.h" @@ -56,10 +56,10 @@ static int ahci_probe(struct platform_device *pdev) if (rc) return rc; - if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci")) + if (device_is_compatible(dev, "hisilicon,hisi-ahci")) hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ; - port = acpi_device_get_match_data(dev); + port = device_get_match_data(dev); if (!port) port = &ahci_port_info; -- 2.30.2