mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 07:31:41 +00:00
mtd: convert drivers/mtd/* to use module_platform_driver()
This patch converts the drivers in drivers/mtd/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
1f9327fcff
commit
f99640dee2
29 changed files with 30 additions and 345 deletions
|
@ -273,18 +273,7 @@ static struct platform_driver socrates_nand_driver = {
|
|||
.remove = __devexit_p(socrates_nand_remove),
|
||||
};
|
||||
|
||||
static int __init socrates_nand_init(void)
|
||||
{
|
||||
return platform_driver_register(&socrates_nand_driver);
|
||||
}
|
||||
|
||||
static void __exit socrates_nand_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&socrates_nand_driver);
|
||||
}
|
||||
|
||||
module_init(socrates_nand_init);
|
||||
module_exit(socrates_nand_exit);
|
||||
module_platform_driver(socrates_nand_driver);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Ilya Yanok");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue