diff mbox

Bluetooth: Use module_platform_driver() in btwilink.c file

Message ID 1344316065-2032-1-git-send-email-sachin.kamat@linaro.org
State Accepted
Headers show

Commit Message

Sachin Kamat Aug. 7, 2012, 5:07 a.m. UTC
module_platform_driver() makes the code simpler by eliminating module_init
and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
This patch is based on bluetooth-next tree and is compile tested.
---
 drivers/bluetooth/btwilink.c |   16 +---------------
 1 files changed, 1 insertions(+), 15 deletions(-)

Comments

Marcel Holtmann Aug. 7, 2012, 6:12 a.m. UTC | #1
Hi Sachin,

> module_platform_driver() makes the code simpler by eliminating module_init
> and module_exit calls.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
> This patch is based on bluetooth-next tree and is compile tested.
> ---
>  drivers/bluetooth/btwilink.c |   16 +---------------
>  1 files changed, 1 insertions(+), 15 deletions(-)

Acked-by: Marcel Holtmann <marcel@holtmann.org>

Regards

Marcel
Gustavo Padovan Aug. 27, 2012, 3:24 p.m. UTC | #2
Hi Sachin,

* Sachin Kamat <sachin.kamat@linaro.org> [2012-08-07 10:37:45 +0530]:

> module_platform_driver() makes the code simpler by eliminating module_init
> and module_exit calls.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
> This patch is based on bluetooth-next tree and is compile tested.
> ---
>  drivers/bluetooth/btwilink.c |   16 +---------------
>  1 files changed, 1 insertions(+), 15 deletions(-)

Patch has been applied to bluetooth-next. Thanks.

	Gustavo
diff mbox

Patch

diff --git a/drivers/bluetooth/btwilink.c b/drivers/bluetooth/btwilink.c
index 4ad7b35..60abf59 100644
--- a/drivers/bluetooth/btwilink.c
+++ b/drivers/bluetooth/btwilink.c
@@ -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 ------ */