提交 c9d1b752 编写于 作者: A Axel Lin 提交者: 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: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册