[PATCH 1/1] staging: mt29f_spinand: Use module_spi_driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



module_spi_driver removes the boilerplate code and simplifies it.

Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
Cc: Henry Pan <hspan@xxxxxxxxxx>
---
 drivers/staging/mt29f_spinand/mt29f_spinand.c |   18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/staging/mt29f_spinand/mt29f_spinand.c b/drivers/staging/mt29f_spinand/mt29f_spinand.c
index 8e95a57..5647079 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@xxxxxxxxxx>, Kamlakant Patel <kamlakant.patel@xxxxxxxxxxxx>");
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux