Commit cb71941a authored by David Daney's avatar David Daney Committed by Grant Likely

of/spi: Fix SPI module loading by using proper "spi:" modalias prefixes.

To get modprobe to automatically load the proper modules, we need to
prefix things with "spi:".  Partially based on Grant Likely's suggestions.
Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
[grant.likely: reworked because drivers/of/of_spi.c has been removed]
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 7d859ff4
......@@ -824,6 +824,7 @@ static void of_register_spi_devices(struct spi_master *master)
struct spi_device *spi;
struct device_node *nc;
const __be32 *prop;
char modalias[SPI_NAME_SIZE + 4];
int rc;
int len;
......@@ -887,7 +888,9 @@ static void of_register_spi_devices(struct spi_master *master)
spi->dev.of_node = nc;
/* Register the new device */
request_module(spi->modalias);
snprintf(modalias, sizeof(modalias), "%s%s", SPI_MODULE_PREFIX,
spi->modalias);
request_module(modalias);
rc = spi_add_device(spi);
if (rc) {
dev_err(&master->dev, "spi_device register error %s\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment