diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-27 11:45:20 +0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-03-27 03:16:18 +0400 |
commit | c9d1b752937244d77d98bbd8e7f486bb715bec50 (patch) | |
tree | e4e46105ac35d56744a46704925ea286771935f7 /drivers/mtd/devices/mtd_dataflash.c | |
parent | df698621a5b39ced5ce527444cafd50c6fdc186d (diff) | |
download | linux-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/mtd_dataflash.c')
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 236057ead0d2..5ec5fc9fe045 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c @@ -946,18 +946,7 @@ static struct spi_driver dataflash_driver = { /* FIXME: investigate suspend and resume... */ }; -static int __init dataflash_init(void) -{ - return spi_register_driver(&dataflash_driver); -} -module_init(dataflash_init); - -static void __exit dataflash_exit(void) -{ - spi_unregister_driver(&dataflash_driver); -} -module_exit(dataflash_exit); - +module_spi_driver(dataflash_driver); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Andrew Victor, David Brownell"); |