On Tue, Apr 09, 2024 at 02:21:25PM +0100, Charles Keepax wrote: > Add a mechanism to force the use of the fwnode name for the name of the > SPI device itself. This is useful when devices need to be manually added > within the kernel. Same comment, we don't need two ways to handle fwnode type (and effectivelly code duplication to some extent). ... > struct acpi_device *adev = ACPI_COMPANION(&spi->dev); > if (adev) { Replace this to be is_acpi_device_node() check... > dev_set_name(&spi->dev, "spi-%s", acpi_dev_name(adev)); ...and derive adev from fwnode. > return; > } > + if (is_software_node(fwnode)) { > + dev_set_name(&spi->dev, "spi-%s", fwnode_get_name(fwnode)); While at this, you can also introduce struct device *dev = &spi->dev; to make these dev_set_name() be shorter. > + return; > + } -- With Best Regards, Andy Shevchenko