Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH 2/2] staging/tidspbridge: use module_platform_driver

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


develkernel412222 at gmail

Jul 21, 2012, 1:56 AM

Post #1 of 2 (51 views)
Permalink
[PATCH 2/2] staging/tidspbridge: use module_platform_driver

the code under _init and _exit does platform_driver_register and
platform_driver_unregister respectively only,

so its better to use the module_platform_driver than just replicating
the module_platform_driver's implementation

Signed-off-by: Devendra Naga <develkernel412222 [at] gmail>
---

drivers/staging/tidspbridge/rmgr/drv_interface.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c
index 3cac014..6acea2b 100644
--- a/drivers/staging/tidspbridge/rmgr/drv_interface.c
+++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c
@@ -613,16 +613,6 @@ static struct platform_driver bridge_driver = {
#endif
};

-static int __init bridge_init(void)
-{
- return platform_driver_register(&bridge_driver);
-}
-
-static void __exit bridge_exit(void)
-{
- platform_driver_unregister(&bridge_driver);
-}
-
/* To remove all process resources before removing the process from the
* process context list */
int drv_remove_all_resources(void *process_ctxt)
@@ -636,6 +626,4 @@ int drv_remove_all_resources(void *process_ctxt)
return status;
}

-/* Bridge driver initialization and de-initialization functions */
-module_init(bridge_init);
-module_exit(bridge_exit);
+module_platform_driver(bridge_driver);
--
1.7.9.5

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


omar.ramirez at ti

Jul 24, 2012, 10:41 AM

Post #2 of 2 (48 views)
Permalink
Re: [PATCH 2/2] staging/tidspbridge: use module_platform_driver [In reply to]

On Sat, Jul 21, 2012 at 3:56 AM, Devendra Naga
<develkernel412222 [at] gmail> wrote:
> the code under _init and _exit does platform_driver_register and
> platform_driver_unregister respectively only,
>
> so its better to use the module_platform_driver than just replicating
> the module_platform_driver's implementation
>
> Signed-off-by: Devendra Naga <develkernel412222 [at] gmail>

FWIW, looks good to me.

Cheers,

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

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.