]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
spi: sprd: don't mark remove function as __exit
authorArnd Bergmann <arnd@arndb.de>
Wed, 26 Sep 2018 12:58:21 +0000 (14:58 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 27 Sep 2018 22:26:43 +0000 (23:26 +0100)
The __exit section is left out for built-in drivers, so a
'remove' callback must not be marked as such to avoid breaking when
we unbind a device at runtime. This was pointed out by kbuild:

`sprd_spi_remove' referenced in section `.data' of drivers/spi/spi-sprd.o: defined in discarded section `.exit.text' of drivers/spi/spi-sprd.o

Fixes: e7d973a31c24 ("spi: sprd: Add SPI driver for Spreadtrum SC9860")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-sprd.c

index a9a6c5ed443fc73e24733e970afe94169ed65a17..8daa24eec6242ee38a66e6ee9b8476dccdf8b8c4 100644 (file)
@@ -676,7 +676,7 @@ static int sprd_spi_probe(struct platform_device *pdev)
        return ret;
 }
 
-static int __exit sprd_spi_remove(struct platform_device *pdev)
+static int sprd_spi_remove(struct platform_device *pdev)
 {
        struct spi_controller *sctlr = platform_get_drvdata(pdev);
        struct sprd_spi *ss = spi_controller_get_devdata(sctlr);