linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Devendra Naga <devendra.aaru@gmail.com>
To: Ben Collins <bcollins@bluecherry.net>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andrew Miller <amiller@amilx.com>,
	linux-media@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Cc: Devendra Naga <devendra.aaru@gmail.com>
Subject: [PATCH 5/6] staging/media/solo6x10: use module_pci_driver macro
Date: Tue, 10 Jul 2012 12:15:26 +0530	[thread overview]
Message-ID: <1341902726-22580-1-git-send-email-devendra.aaru@gmail.com> (raw)

the driver duplicates the module_pci_driver code,
how?
	module_pci_driver is used for those drivers whose
	init and exit paths does only register and unregister
	to pci API and nothing else.

so use the module_pci_driver macro instead

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
 drivers/staging/media/solo6x10/core.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/staging/media/solo6x10/core.c b/drivers/staging/media/solo6x10/core.c
index d2fd842..3ee9b12 100644
--- a/drivers/staging/media/solo6x10/core.c
+++ b/drivers/staging/media/solo6x10/core.c
@@ -318,15 +318,4 @@ static struct pci_driver solo_pci_driver = {
 	.remove = solo_pci_remove,
 };
 
-static int __init solo_module_init(void)
-{
-	return pci_register_driver(&solo_pci_driver);
-}
-
-static void __exit solo_module_exit(void)
-{
-	pci_unregister_driver(&solo_pci_driver);
-}
-
-module_init(solo_module_init);
-module_exit(solo_module_exit);
+module_pci_driver(solo_pci_driver);
-- 
1.7.9.5


             reply	other threads:[~2012-07-10  6:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10  6:45 Devendra Naga [this message]
2012-07-17 20:17 ` [PATCH 5/6] staging/media/solo6x10: use module_pci_driver macro Ismael Luceno

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=1341902726-22580-1-git-send-email-devendra.aaru@gmail.com \
    --to=devendra.aaru@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=amiller@amilx.com \
    --cc=bcollins@bluecherry.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).