diff options
author | Alexander Stein <alexanders83@web.de> | 2014-04-15 13:38:56 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-04-16 04:22:03 -0400 |
commit | 4b973ee05673497de678338c00ade803e45f9bfa (patch) | |
tree | 59e6909a501804f01b1b8e75bc565185e3b530b4 | |
parent | d700d70dfd2e5ff951bb004e390a0f55bdd161de (diff) |
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>
-rw-r--r-- | sound/atmel/ac97c.c | 15 |
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) | |||
1198 | } | 1198 | } |
1199 | 1199 | ||
1200 | static struct platform_driver atmel_ac97c_driver = { | 1200 | static struct platform_driver atmel_ac97c_driver = { |
1201 | .probe = atmel_ac97c_probe, | ||
1201 | .remove = atmel_ac97c_remove, | 1202 | .remove = atmel_ac97c_remove, |
1202 | .driver = { | 1203 | .driver = { |
1203 | .name = "atmel_ac97c", | 1204 | .name = "atmel_ac97c", |
@@ -1205,19 +1206,7 @@ static struct platform_driver atmel_ac97c_driver = { | |||
1205 | .pm = ATMEL_AC97C_PM_OPS, | 1206 | .pm = ATMEL_AC97C_PM_OPS, |
1206 | }, | 1207 | }, |
1207 | }; | 1208 | }; |
1208 | 1209 | module_platform_driver(atmel_ac97c_driver); | |
1209 | static int __init atmel_ac97c_init(void) | ||
1210 | { | ||
1211 | return platform_driver_probe(&atmel_ac97c_driver, | ||
1212 | atmel_ac97c_probe); | ||
1213 | } | ||
1214 | module_init(atmel_ac97c_init); | ||
1215 | |||
1216 | static void __exit atmel_ac97c_exit(void) | ||
1217 | { | ||
1218 | platform_driver_unregister(&atmel_ac97c_driver); | ||
1219 | } | ||
1220 | module_exit(atmel_ac97c_exit); | ||
1221 | 1210 | ||
1222 | MODULE_LICENSE("GPL"); | 1211 | MODULE_LICENSE("GPL"); |
1223 | MODULE_DESCRIPTION("Driver for Atmel AC97 controller"); | 1212 | MODULE_DESCRIPTION("Driver for Atmel AC97 controller"); |