Skip to content

Commit

Permalink
drivers/rtc/rtc-at91sam9.c: use module_platform_driver() macro
Browse files Browse the repository at this point in the history
This driver does seems to do only platform_driver_register in the init
function and platform_driver_unregister in the exit function,

so replace all this code including the module_init and module_exit with
module_platform_driver macro...

Signed-off-by: Devendra Naga <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Devendra Naga authored and torvalds committed Oct 5, 2012
1 parent 2830a6d commit 477d30d
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/rtc/rtc-at91sam9.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,18 +473,7 @@ static struct platform_driver at91_rtc_driver = {
},
};

static int __init at91_rtc_init(void)
{
return platform_driver_register(&at91_rtc_driver);
}
module_init(at91_rtc_init);

static void __exit at91_rtc_exit(void)
{
platform_driver_unregister(&at91_rtc_driver);
}
module_exit(at91_rtc_exit);

module_platform_driver(at91_rtc_driver);

MODULE_AUTHOR("Michel Benoit");
MODULE_DESCRIPTION("RTC driver for Atmel AT91SAM9x");
Expand Down

0 comments on commit 477d30d

Please sign in to comment.