rtc: convert rtc spi drivers to module_spi_driver
Factor out some boilerplate code for spi driver registration into module_spi_driver. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Mark Jackson <mpfj@mimc.co.uk> Cc: Dennis Aberilla <denzzzhome@yahoo.com> Cc: Nikolaus Voss <n.voss@weinmann.de> Cc: "Kim B. Heino" <Kim.Heino@bluegiga.com> Cc: Raphael Assenat <raph@raphnet.net> Cc: Chris Verges <chrisv@cyberswitching.com> Cc: Magnus Damm <damm@opensource.se> Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp> 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>
This commit is contained in:
@@ -206,17 +206,7 @@ static struct spi_driver m41t93_driver = {
|
||||
.remove = __devexit_p(m41t93_remove),
|
||||
};
|
||||
|
||||
static __init int m41t93_init(void)
|
||||
{
|
||||
return spi_register_driver(&m41t93_driver);
|
||||
}
|
||||
module_init(m41t93_init);
|
||||
|
||||
static __exit void m41t93_exit(void)
|
||||
{
|
||||
spi_unregister_driver(&m41t93_driver);
|
||||
}
|
||||
module_exit(m41t93_exit);
|
||||
module_spi_driver(m41t93_driver);
|
||||
|
||||
MODULE_AUTHOR("Nikolaus Voss <n.voss@weinmann.de>");
|
||||
MODULE_DESCRIPTION("Driver for ST M41T93 SPI RTC");
|
||||
|
Reference in New Issue
Block a user