* [PATCH] e820: use module_platform_driver
@ 2016-12-05 8:23 Johannes Thumshirn
2016-12-05 17:01 ` Dan Williams
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Thumshirn @ 2016-12-05 8:23 UTC (permalink / raw)
To: Dan Williams
Cc: Linux NVDIMM Mailing List, Linux Kernel Mailinglist, Johannes Thumshirn
Use module_platform_driver for the e820 driver instead of open-coding it.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
drivers/nvdimm/e820.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/nvdimm/e820.c b/drivers/nvdimm/e820.c
index 11ea901..6f9a6ff 100644
--- a/drivers/nvdimm/e820.c
+++ b/drivers/nvdimm/e820.c
@@ -84,18 +84,8 @@ static struct platform_driver e820_pmem_driver = {
},
};
-static __init int e820_pmem_init(void)
-{
- return platform_driver_register(&e820_pmem_driver);
-}
-
-static __exit void e820_pmem_exit(void)
-{
- platform_driver_unregister(&e820_pmem_driver);
-}
+module_platform_driver(e820_pmem_driver);
MODULE_ALIAS("platform:e820_pmem*");
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Intel Corporation");
-module_init(e820_pmem_init);
-module_exit(e820_pmem_exit);
--
2.10.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] e820: use module_platform_driver
2016-12-05 8:23 [PATCH] e820: use module_platform_driver Johannes Thumshirn
@ 2016-12-05 17:01 ` Dan Williams
0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2016-12-05 17:01 UTC (permalink / raw)
To: Johannes Thumshirn; +Cc: Linux NVDIMM Mailing List, Linux Kernel Mailinglist
On Mon, Dec 5, 2016 at 12:23 AM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> Use module_platform_driver for the e820 driver instead of open-coding it.
>
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Applied, thanks Johannes.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-05 17:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-05 8:23 [PATCH] e820: use module_platform_driver Johannes Thumshirn
2016-12-05 17:01 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).