소스 검색

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>
Sachin Kamat 12 년 전
부모
커밋
4a54b61500
1개의 변경된 파일1개의 추가작업 그리고 17개의 파일을 삭제
  1. 1 17
      drivers/staging/mt29f_spinand/mt29f_spinand.c

+ 1 - 17
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>");