diff options
author | Mathias Krause <minipli@googlemail.com> | 2013-08-31 20:24:14 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-27 14:53:52 +0100 |
commit | 70fac17cec347c4013cb8f380c6fe6554a13d884 (patch) | |
tree | 7801a9077e86a170a9f3409f701b7108685bc2f5 /drivers/spi/spi.c | |
parent | 4a10c2ac2f368583138b774ca41fac4207911983 (diff) |
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>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 9e039c60c06..74a526ce8c0 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -839,7 +839,6 @@ 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; @@ -944,9 +943,7 @@ static void of_register_spi_devices(struct spi_master *master) 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", |