Re: [PATCH v5 3/4] spi: Update swnode based SPI devices to use the fwnode name

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

 



On Thu, Apr 11, 2024 at 04:33:05PM +0300, Andy Shevchenko wrote:
> On Thu, Apr 11, 2024 at 12:06 PM Charles Keepax
> <ckeepax@xxxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > Update the name for software node based SPI devices to use the fwnode
> > name as the device name. This is helpful since swnode devices are
> > usually added within the kernel, and the kernel often then requires a
> > predictable name such that it can refer back to the device.
> 
> ...
> 
> > +       if (is_software_node(fwnode)) {
> > +               dev_set_name(dev, "spi-%s", fwnode_get_name(fwnode));
> 
> Wouldn't %pfwP / %pfw work?
> 

Oh I was totally unaware of those will have a look, thanks.

> Thinking more about this, maybe even the ACPI case also can be combined?
> See for the details
> 
> 87526603c892 ("irqdomain: Get rid of special treatment for ACPI in
> __irq_domain_add()")
> 9ed78b05f998 ("irqdomain: Allow software nodes for IRQ domain creation")
> 

Maybe, I am not super confident that acpi_dev_name will always
return the same thing as fwnode_get_name and I don't really want
to risk renaming everything on the ACPI side.

Thanks,
Charles




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux