From: Mathias Krause Date: Sat, 31 Aug 2013 18:24:14 +0000 (+0200) Subject: spi: simplify call to request_module() X-Git-Tag: next-20130919~24^2~10^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a7b1b5f092c03104f8d313b06354825b50187179;p=karo-tx-linux.git 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 Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index f56017ea55e9..789ac9428be0 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -823,7 +823,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; @@ -887,9 +886,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",