[PATCH] ALSA: au1x00: use module_platform_driver()

From: Christoph Jaeger
Date: Wed Apr 09 2014 - 03:43:49 EST


Eliminate boilerplate code by using module_platform_driver().

Signed-off-by: Christoph Jaeger <christophjaeger@xxxxxxxxx>
---
sound/mips/au1x00.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c
index a7cc49e..d10ef76 100644
--- a/sound/mips/au1x00.c
+++ b/sound/mips/au1x00.c
@@ -725,15 +725,4 @@ struct platform_driver au1000_ac97c_driver = {
.remove = au1000_ac97_remove,
};

-static int __init au1000_ac97_load(void)
-{
- return platform_driver_register(&au1000_ac97c_driver);
-}
-
-static void __exit au1000_ac97_unload(void)
-{
- platform_driver_unregister(&au1000_ac97c_driver);
-}
-
-module_init(au1000_ac97_load);
-module_exit(au1000_ac97_unload);
+module_platform_driver(au1000_ac97c_driver);
--
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/