提交 70fac17c 编写于 作者: M Mathias Krause 提交者: Mark Brown

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: NMathias Krause <minipli@googlemail.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 4a10c2ac
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册