提交 4b973ee0 编写于 作者: A Alexander Stein 提交者: Takashi Iwai

ALSA: sound/atmel/ac97c.c: Convert to module_platform_driver

This reduces some boilerplate code.
Signed-off-by: NAlexander Stein <alexanders83@web.de>
Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 d700d70d
......@@ -1198,6 +1198,7 @@ static int atmel_ac97c_remove(struct platform_device *pdev)
}
static struct platform_driver atmel_ac97c_driver = {
.probe = atmel_ac97c_probe,
.remove = atmel_ac97c_remove,
.driver = {
.name = "atmel_ac97c",
......@@ -1205,19 +1206,7 @@ static struct platform_driver atmel_ac97c_driver = {
.pm = ATMEL_AC97C_PM_OPS,
},
};
static int __init atmel_ac97c_init(void)
{
return platform_driver_probe(&atmel_ac97c_driver,
atmel_ac97c_probe);
}
module_init(atmel_ac97c_init);
static void __exit atmel_ac97c_exit(void)
{
platform_driver_unregister(&atmel_ac97c_driver);
}
module_exit(atmel_ac97c_exit);
module_platform_driver(atmel_ac97c_driver);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Driver for Atmel AC97 controller");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册