Skip to content

Commit 259b836

Browse files
andy-shevgregkh
authored andcommitted
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 <andriy.shevchenko@linux.intel.com> Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Message-ID: <20230609154900.43024-4-andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2de5897 commit 259b836

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/ata/ahci_platform.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
*/
1010

1111
#include <linux/kernel.h>
12+
#include <linux/mod_devicetable.h>
1213
#include <linux/module.h>
1314
#include <linux/pm.h>
1415
#include <linux/device.h>
15-
#include <linux/of_device.h>
1616
#include <linux/platform_device.h>
17+
#include <linux/property.h>
1718
#include <linux/libata.h>
1819
#include <linux/ahci_platform.h>
19-
#include <linux/acpi.h>
2020
#include <linux/pci_ids.h>
2121
#include "ahci.h"
2222

@@ -56,10 +56,10 @@ static int ahci_probe(struct platform_device *pdev)
5656
if (rc)
5757
return rc;
5858

59-
if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
59+
if (device_is_compatible(dev, "hisilicon,hisi-ahci"))
6060
hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
6161

62-
port = acpi_device_get_match_data(dev);
62+
port = device_get_match_data(dev);
6363
if (!port)
6464
port = &ahci_port_info;
6565

0 commit comments

Comments
 (0)