summaryrefslogtreecommitdiff
path: root/drivers/mtd/devices/sst25l.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-27 11:45:20 +0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-27 03:16:18 +0400
commitc9d1b752937244d77d98bbd8e7f486bb715bec50 (patch)
treee4e46105ac35d56744a46704925ea286771935f7 /drivers/mtd/devices/sst25l.c
parentdf698621a5b39ced5ce527444cafd50c6fdc186d (diff)
downloadlinux-c9d1b752937244d77d98bbd8e7f486bb715bec50.tar.xz
mtd: convert drivers/mtd/* to use module_spi_driver()
This patch converts the drivers in drivers/mtd/* to use the module_spi_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/devices/sst25l.c')
-rw-r--r--drivers/mtd/devices/sst25l.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index 5fc198350b94..196fd95b19d6 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -450,18 +450,7 @@ static struct spi_driver sst25l_driver = {
.remove = __devexit_p(sst25l_remove),
};
-static int __init sst25l_init(void)
-{
- return spi_register_driver(&sst25l_driver);
-}
-
-static void __exit sst25l_exit(void)
-{
- spi_unregister_driver(&sst25l_driver);
-}
-
-module_init(sst25l_init);
-module_exit(sst25l_exit);
+module_spi_driver(sst25l_driver);
MODULE_DESCRIPTION("MTD SPI driver for SST25L Flash chips");
MODULE_AUTHOR("Andre Renaud <andre@bluewatersys.com>, "