提交 061d2a3e 编写于 作者: F Fabio Porcedda 提交者: Linus Torvalds

drivers/rtc/rtc-ds1216.c: use module_platform_driver_probe()

Use module_platform_driver_probe() macro which makes the code smaller and
simpler.
Signed-off-by: NFabio Porcedda <fabio.porcedda@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 1d2e2b65
...@@ -174,21 +174,10 @@ static struct platform_driver ds1216_rtc_platform_driver = { ...@@ -174,21 +174,10 @@ static struct platform_driver ds1216_rtc_platform_driver = {
}, },
}; };
static int __init ds1216_rtc_init(void) module_platform_driver_probe(ds1216_rtc_platform_driver, ds1216_rtc_probe);
{
return platform_driver_probe(&ds1216_rtc_platform_driver, ds1216_rtc_probe);
}
static void __exit ds1216_rtc_exit(void)
{
platform_driver_unregister(&ds1216_rtc_platform_driver);
}
MODULE_AUTHOR("Thomas Bogendoerfer <tsbogend@alpha.franken.de>"); MODULE_AUTHOR("Thomas Bogendoerfer <tsbogend@alpha.franken.de>");
MODULE_DESCRIPTION("DS1216 RTC driver"); MODULE_DESCRIPTION("DS1216 RTC driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION); MODULE_VERSION(DRV_VERSION);
MODULE_ALIAS("platform:rtc-ds1216"); MODULE_ALIAS("platform:rtc-ds1216");
module_init(ds1216_rtc_init);
module_exit(ds1216_rtc_exit);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册