aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
authorMiquel Raynal <[email protected]>2023-04-04 17:21:16 +0000
committerGreg Kroah-Hartman <[email protected]>2023-04-05 17:41:10 +0000
commit673aa1ed1c9b6710bf24e3f0957d85e2f46c77db (patch)
tree5fed46d6239a4f11bcad00cb1d6354fe97d565d8 /drivers/spi/spi.c
parentof: Update of_device_get_modalias() (diff)
downloadkernel-673aa1ed1c9b6710bf24e3f0957d85e2f46c77db.tar.gz
kernel-673aa1ed1c9b6710bf24e3f0957d85e2f46c77db.zip
of: Rename of_modalias_node()
This helper does not produce a real modalias, but tries to get the "product" compatible part of the "vendor,product" compatibles only. It is far from creating a purely useful modalias string and does not seem to be used like that directly anyway, so let's try to give this helper a more meaningful name before moving there a real modalias helper (already existing under of/device.c). Also update the various documentations to refer to the strings as "aliases" rather than "modaliases" which has a real meaning in the Linux kernel. There is no functional change. Cc: Rafael J. Wysocki <[email protected]> Cc: Len Brown <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: Sebastian Reichel <[email protected]> Cc: Wolfram Sang <[email protected]> Cc: Mark Brown <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Rob Herring <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Acked-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r--drivers/spi/spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 44b85a8d47f1..3bbdc5fe3b99 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2354,8 +2354,8 @@ of_register_spi_device(struct spi_controller *ctlr, struct device_node *nc)
}
/* Select device driver */
- rc = of_modalias_node(nc, spi->modalias,
- sizeof(spi->modalias));
+ rc = of_alias_from_compatible(nc, spi->modalias,
+ sizeof(spi->modalias));
if (rc < 0) {
dev_err(&ctlr->dev, "cannot find modalias for %pOF\n", nc);
goto err_out;