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>
此提交包含在:
@@ -153,19 +153,7 @@ static struct spi_driver m41t94_driver = {
|
||||
.remove = __devexit_p(m41t94_remove),
|
||||
};
|
||||
|
||||
static __init int m41t94_init(void)
|
||||
{
|
||||
return spi_register_driver(&m41t94_driver);
|
||||
}
|
||||
|
||||
module_init(m41t94_init);
|
||||
|
||||
static __exit void m41t94_exit(void)
|
||||
{
|
||||
spi_unregister_driver(&m41t94_driver);
|
||||
}
|
||||
|
||||
module_exit(m41t94_exit);
|
||||
module_spi_driver(m41t94_driver);
|
||||
|
||||
MODULE_AUTHOR("Kim B. Heino <Kim.Heino@bluegiga.com>");
|
||||
MODULE_DESCRIPTION("Driver for ST M41T94 SPI RTC");
|
||||
|
新增問題並參考
封鎖使用者