spi: simplify call to request_module()
request_module() can handle format strings on its own, no need to create
the full module name ourself.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 9e039c6..74a526c 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -839,7 +839,6 @@
struct spi_device *spi;
struct device_node *nc;
const __be32 *prop;
- char modalias[SPI_NAME_SIZE + 4];
int rc;
int len;
@@ -944,9 +943,7 @@
spi->dev.of_node = nc;
/* Register the new device */
- snprintf(modalias, sizeof(modalias), "%s%s", SPI_MODULE_PREFIX,
- spi->modalias);
- request_module(modalias);
+ request_module("%s%s", SPI_MODULE_PREFIX, spi->modalias);
rc = spi_add_device(spi);
if (rc) {
dev_err(&master->dev, "spi_device register error %s\n",