Bluetooth: Use module_platform_driver() in btwilink.c file
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 7 Aug 2012 05:07:45 +0000 (10:37 +0530)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Sat, 8 Sep 2012 19:53:47 +0000 (16:53 -0300)
module_platform_driver() makes the code simpler by eliminating module_init
and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
drivers/bluetooth/btwilink.c

index 4ad7b35cfc0e1b46d0285e64d77aca460ae8b2bd..60abf596f60ea21f9354ae1b3d3608bb04e4142e 100644 (file)
@@ -358,21 +358,7 @@ static struct platform_driver btwilink_driver = {
        },
 };
 
-/* ------- Module Init/Exit interfaces ------ */
-static int __init btwilink_init(void)
-{
-       BT_INFO("Bluetooth Driver for TI WiLink - Version %s", VERSION);
-
-       return platform_driver_register(&btwilink_driver);
-}
-
-static void __exit btwilink_exit(void)
-{
-       platform_driver_unregister(&btwilink_driver);
-}
-
-module_init(btwilink_init);
-module_exit(btwilink_exit);
+module_platform_driver(btwilink_driver);
 
 /* ------ Module Info ------ */