Skip to content

Commit 4a54b61

Browse files
Sachin Kamatgregkh
Sachin Kamat
authored andcommitted
staging: mt29f_spinand: Use module_spi_driver
module_spi_driver removes the boilerplate code and simplifies it. Signed-off-by: Sachin Kamat <[email protected]> Cc: Henry Pan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7a620a6 commit 4a54b61

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

drivers/staging/mt29f_spinand/mt29f_spinand.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -939,23 +939,7 @@ static struct spi_driver spinand_driver = {
939939
.remove = spinand_remove,
940940
};
941941

942-
/*
943-
* Device driver registration
944-
*/
945-
static int __init spinand_init(void)
946-
{
947-
return spi_register_driver(&spinand_driver);
948-
}
949-
950-
/*
951-
* unregister Device driver.
952-
*/
953-
static void __exit spinand_exit(void)
954-
{
955-
spi_unregister_driver(&spinand_driver);
956-
}
957-
module_init(spinand_init);
958-
module_exit(spinand_exit);
942+
module_spi_driver(spinand_driver);
959943

960944
MODULE_DESCRIPTION("SPI NAND driver for Micron");
961945
MODULE_AUTHOR("Henry Pan <[email protected]>, Kamlakant Patel <[email protected]>");

0 commit comments

Comments
 (0)