mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Devendra Naga <develkernel412222@gmail.com>
To: "Omar Ramirez Luna" <omar.ramirez@ti.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Víctor Manuel Jáquez Leal" <vjaquez@igalia.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: Devendra Naga <develkernel412222@gmail.com>
Subject: [PATCH 2/2] staging/tidspbridge: use module_platform_driver
Date: Sat, 21 Jul 2012 14:41:00 +0545	[thread overview]
Message-ID: <1342860960-19463-1-git-send-email-develkernel412222@gmail.com> (raw)

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@gmail.com>
---

 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


             reply	other threads:[~2012-07-21  8:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-21  8:56 Devendra Naga [this message]
2012-07-24 17:41 ` Ramirez Luna, Omar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342860960-19463-1-git-send-email-develkernel412222@gmail.com \
    --to=develkernel412222@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=omar.ramirez@ti.com \
    --cc=vjaquez@igalia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome