summaryrefslogtreecommitdiff
path: root/sound/atmel
diff options
context:
space:
mode:
authorAlexander Stein <alexanders83@web.de>2014-04-15 21:38:56 +0400
committerTakashi Iwai <tiwai@suse.de>2014-04-16 12:22:03 +0400
commit4b973ee05673497de678338c00ade803e45f9bfa (patch)
tree59e6909a501804f01b1b8e75bc565185e3b530b4 /sound/atmel
parentd700d70dfd2e5ff951bb004e390a0f55bdd161de (diff)
downloadlinux-4b973ee05673497de678338c00ade803e45f9bfa.tar.xz
ALSA: sound/atmel/ac97c.c: Convert to module_platform_driver
This reduces some boilerplate code. Signed-off-by: Alexander Stein <alexanders83@web.de> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/atmel')
-rw-r--r--sound/atmel/ac97c.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index 05ec049c9faf..a04d23174dc2 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -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");