[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZIc3enu+EW93WjW7@smile.fi.intel.com>
Date: Mon, 12 Jun 2023 18:19:22 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: Damien Le Moal <dlemoal@...nel.org>,
Serge Semin <Sergey.Semin@...kalelectronics.ru>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-acpi@...r.kernel.org, Hans de Goede <hdegoede@...hat.com>,
Jens Axboe <axboe@...nel.dk>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>,
Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Subject: Re: [PATCH v2 3/3] ata: ahci_platform: Make code agnostic to OF/ACPI
On Mon, Jun 12, 2023 at 09:06:52AM +0000, Sakari Ailus wrote:
> On Fri, Jun 09, 2023 at 06:49:00PM +0300, Andy Shevchenko wrote:
...
> > - 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);
>
> There are just a handful of users for acpi_device_get_match_data() in the
> tree. The code could be moved to acpi_fwnode_device_get_match_data() after
> coverting these. May be out of scope of this set though.
Why do we need that one if we can use device_get_match_data() directly?
It will be also flexible in case one of OF code will need something like
this (custom info structure for the respective compatible string).
That said, I don't think we need to change to acpi_*() whatever.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists