diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2012-10-04 20:14:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-05 14:05:04 -0400 |
commit | be8b6d510072461b50958527e7b157f53e5388d7 (patch) | |
tree | 0b15ee361e714dbe710237f477449f079501b87e /drivers/rtc/rtc-mxc.c | |
parent | 0f3cde536d5015a918c4b3fd55fbe335428096e5 (diff) |
rtc: rtc-mxc: convert to module_platform_driver
Converting to module_platform_driver can make the code smaller and cleaner.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-mxc.c')
-rw-r--r-- | drivers/rtc/rtc-mxc.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index 334c43e0ce0e..cd0106293a49 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers/rtc/rtc-mxc.c | |||
@@ -343,7 +343,7 @@ static struct rtc_class_ops mxc_rtc_ops = { | |||
343 | .alarm_irq_enable = mxc_rtc_alarm_irq_enable, | 343 | .alarm_irq_enable = mxc_rtc_alarm_irq_enable, |
344 | }; | 344 | }; |
345 | 345 | ||
346 | static int __init mxc_rtc_probe(struct platform_device *pdev) | 346 | static int __devinit mxc_rtc_probe(struct platform_device *pdev) |
347 | { | 347 | { |
348 | struct resource *res; | 348 | struct resource *res; |
349 | struct rtc_device *rtc; | 349 | struct rtc_device *rtc; |
@@ -433,7 +433,7 @@ exit_free_pdata: | |||
433 | return ret; | 433 | return ret; |
434 | } | 434 | } |
435 | 435 | ||
436 | static int __exit mxc_rtc_remove(struct platform_device *pdev) | 436 | static int __devexit mxc_rtc_remove(struct platform_device *pdev) |
437 | { | 437 | { |
438 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); | 438 | struct rtc_plat_data *pdata = platform_get_drvdata(pdev); |
439 | 439 | ||
@@ -480,21 +480,11 @@ static struct platform_driver mxc_rtc_driver = { | |||
480 | #endif | 480 | #endif |
481 | .owner = THIS_MODULE, | 481 | .owner = THIS_MODULE, |
482 | }, | 482 | }, |
483 | .remove = __exit_p(mxc_rtc_remove), | 483 | .probe = mxc_rtc_probe, |
484 | .remove = __devexit_p(mxc_rtc_remove), | ||
484 | }; | 485 | }; |
485 | 486 | ||
486 | static int __init mxc_rtc_init(void) | 487 | module_platform_driver(mxc_rtc_driver) |
487 | { | ||
488 | return platform_driver_probe(&mxc_rtc_driver, mxc_rtc_probe); | ||
489 | } | ||
490 | |||
491 | static void __exit mxc_rtc_exit(void) | ||
492 | { | ||
493 | platform_driver_unregister(&mxc_rtc_driver); | ||
494 | } | ||
495 | |||
496 | module_init(mxc_rtc_init); | ||
497 | module_exit(mxc_rtc_exit); | ||
498 | 488 | ||
499 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); | 489 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); |
500 | MODULE_DESCRIPTION("RTC driver for Freescale MXC"); | 490 | MODULE_DESCRIPTION("RTC driver for Freescale MXC"); |