[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZIg2fAMxhHgHY1Lk@kekkonen.localdomain>
Date: Tue, 13 Jun 2023 09:27:24 +0000
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...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
Hi Andy,
On Mon, Jun 12, 2023 at 06:19:22PM +0300, Andy Shevchenko wrote:
> 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?
That was what I wanted to point your attention to. ;-)
> 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.
I agree.
--
Kind regards,
Sakari Ailus
Powered by blists - more mailing lists