Commit c9d1b752 authored by Axel Lin's avatar Axel Lin Committed by David Woodhouse

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent df698621
...@@ -1004,21 +1004,7 @@ static struct spi_driver m25p80_driver = { ...@@ -1004,21 +1004,7 @@ static struct spi_driver m25p80_driver = {
*/ */
}; };
module_spi_driver(m25p80_driver);
static int __init m25p80_init(void)
{
return spi_register_driver(&m25p80_driver);
}
static void __exit m25p80_exit(void)
{
spi_unregister_driver(&m25p80_driver);
}
module_init(m25p80_init);
module_exit(m25p80_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mike Lavender"); MODULE_AUTHOR("Mike Lavender");
......
...@@ -946,18 +946,7 @@ static struct spi_driver dataflash_driver = { ...@@ -946,18 +946,7 @@ static struct spi_driver dataflash_driver = {
/* FIXME: investigate suspend and resume... */ /* FIXME: investigate suspend and resume... */
}; };
static int __init dataflash_init(void) module_spi_driver(dataflash_driver);
{
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_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Andrew Victor, David Brownell"); MODULE_AUTHOR("Andrew Victor, David Brownell");
......
...@@ -450,18 +450,7 @@ static struct spi_driver sst25l_driver = { ...@@ -450,18 +450,7 @@ static struct spi_driver sst25l_driver = {
.remove = __devexit_p(sst25l_remove), .remove = __devexit_p(sst25l_remove),
}; };
static int __init sst25l_init(void) module_spi_driver(sst25l_driver);
{
return spi_register_driver(&sst25l_driver);
}
static void __exit sst25l_exit(void)
{
spi_unregister_driver(&sst25l_driver);
}
module_init(sst25l_init);
module_exit(sst25l_exit);
MODULE_DESCRIPTION("MTD SPI driver for SST25L Flash chips"); MODULE_DESCRIPTION("MTD SPI driver for SST25L Flash chips");
MODULE_AUTHOR("Andre Renaud <andre@bluewatersys.com>, " MODULE_AUTHOR("Andre Renaud <andre@bluewatersys.com>, "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment