Message ID | 20240416100904.3738093-4-ckeepax@opensource.cirrus.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ed8921188f3568ba1659ff041f21e83565c74ec2 |
Headers | show |
Series | Add bridged amplifiers to cs42l43 | expand |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index d1f82a35f2d0..4fcaadf8a484 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -605,6 +605,11 @@ static void spi_dev_set_name(struct spi_device *spi) return; } + if (is_software_node(fwnode)) { + dev_set_name(dev, "spi-%pfwP", fwnode); + return; + } + dev_set_name(&spi->dev, "%s.%u", dev_name(&spi->controller->dev), spi_get_chipselect(spi, 0)); }