Re: [PATCH v2 3/3] ata: ahci_platform: Make code agnostic to OF/ACPI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux