diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-10-09 17:11:37 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-11 15:23:14 -0700 |
commit | 4a54b615005dbc033c8126cd4832bc3bbba4d952 (patch) | |
tree | 834e9b22492117e4913848e9b3ff5aa49c64ca87 | |
parent | 7a620a650b975cefd1b10b2ed7144b6c480fff12 (diff) |
staging: mt29f_spinand: Use module_spi_driver
module_spi_driver removes the boilerplate code and simplifies it.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Henry Pan <hspan@micron.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/mt29f_spinand/mt29f_spinand.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/staging/mt29f_spinand/mt29f_spinand.c b/drivers/staging/mt29f_spinand/mt29f_spinand.c index 8e95a57a8c4c..564707947598 100644 --- a/drivers/staging/mt29f_spinand/mt29f_spinand.c +++ b/drivers/staging/mt29f_spinand/mt29f_spinand.c @@ -939,23 +939,7 @@ static struct spi_driver spinand_driver = { .remove = spinand_remove, }; -/* - * Device driver registration - */ -static int __init spinand_init(void) -{ - return spi_register_driver(&spinand_driver); -} - -/* - * unregister Device driver. - */ -static void __exit spinand_exit(void) -{ - spi_unregister_driver(&spinand_driver); -} -module_init(spinand_init); -module_exit(spinand_exit); +module_spi_driver(spinand_driver); MODULE_DESCRIPTION("SPI NAND driver for Micron"); MODULE_AUTHOR("Henry Pan <hspan@micron.com>, Kamlakant Patel <kamlakant.patel@broadcom.com>"); |