summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/m25p80.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-27 15:45:20 +0800
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-27 00:16:18 +0100
commitc9d1b752937244d77d98bbd8e7f486bb715bec50 (patch)
treee4e46105ac35d56744a46704925ea286771935f7 /drivers/mtd/devices/m25p80.c
parentdf698621a5b39ced5ce527444cafd50c6fdc186d (diff)
downloadop-kernel-dev-c9d1b752937244d77d98bbd8e7f486bb715bec50.zip
op-kernel-dev-c9d1b752937244d77d98bbd8e7f486bb715bec50.tar.gz
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/m25p80.c')
-rw-r--r--drivers/mtd/devices/m25p80.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 7c60ddd..230b02e 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -1004,21 +1004,7 @@ static struct spi_driver m25p80_driver = {
*/
};
-
-static int __init m25p80_init(void)
-{
- return spi_register_driver(&m25p80_driver);
-}
-
-
-static void __exit m25p80_exit(void)
-{
- spi_unregister_driver(&m25p80_driver);
-}
-
-
-module_init(m25p80_init);
-module_exit(m25p80_exit);
+module_spi_driver(m25p80_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mike Lavender");
OpenPOWER on IntegriCloud