linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gianluca Gennari <gennarone@gmail.com>
To: linux-media@vger.kernel.org, crope@iki.fi
Cc: m@bues.ch, hfvogt@gmx.net, mchehab@redhat.com,
	Gianluca Gennari <gennarone@gmail.com>
Subject: [PATCH 5/5] af9035: use module_usb_driver macro
Date: Mon,  2 Apr 2012 23:25:17 +0200	[thread overview]
Message-ID: <1333401917-27203-6-git-send-email-gennarone@gmail.com> (raw)
In-Reply-To: <1333401917-27203-1-git-send-email-gennarone@gmail.com>

Let's save a few lines of code using the module_usb_driver macro.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
---
 drivers/media/dvb/dvb-usb/af9035.c |   26 +-------------------------
 1 files changed, 1 insertions(+), 25 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/af9035.c b/drivers/media/dvb/dvb-usb/af9035.c
index 8bf6367..3242312 100644
--- a/drivers/media/dvb/dvb-usb/af9035.c
+++ b/drivers/media/dvb/dvb-usb/af9035.c
@@ -973,31 +973,7 @@ static struct usb_driver af9035_usb_driver = {
 	.id_table = af9035_id,
 };
 
-/* module stuff */
-static int __init af9035_usb_module_init(void)
-{
-	int ret;
-
-	ret = usb_register(&af9035_usb_driver);
-	if (ret < 0)
-		goto err;
-
-	return 0;
-
-err:
-	pr_debug("%s: failed=%d\n", __func__, ret);
-
-	return ret;
-}
-
-static void __exit af9035_usb_module_exit(void)
-{
-	/* deregister this driver from the USB subsystem */
-	usb_deregister(&af9035_usb_driver);
-}
-
-module_init(af9035_usb_module_init);
-module_exit(af9035_usb_module_exit);
+module_usb_driver(af9035_usb_driver);
 
 MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");
 MODULE_DESCRIPTION("Afatech AF9035 driver");
-- 
1.7.5.4


  parent reply	other threads:[~2012-04-02 21:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-02 21:25 [PATCH 0/5] af9035: support for tda18218 tuner, new USB IDs and more Gianluca Gennari
2012-04-02 21:25 ` [PATCH 1/5] af9035: add USB id for 07ca:a867 Gianluca Gennari
2012-04-02 22:32   ` Antti Palosaari
2012-04-02 21:25 ` [PATCH 2/5] af9035: add support for the tda18218 tuner Gianluca Gennari
2012-04-02 22:33   ` Antti Palosaari
2012-04-02 21:25 ` [PATCH 3/5] tda18218: fix IF frequency for 7MHz bandwidth channels Gianluca Gennari
2012-04-02 22:40   ` Antti Palosaari
2012-04-03  0:44     ` Gianluca Gennari
2012-04-03  7:18       ` poma
2012-04-03 10:19       ` Antti Palosaari
2012-04-03 16:03         ` Gianluca Gennari
2012-04-04 13:15         ` Gianluca Gennari
2012-04-04 13:27           ` Antti Palosaari
2012-04-06 10:40             ` Gianluca Gennari
2012-04-02 21:25 ` [PATCH 4/5] af9035: fix warning Gianluca Gennari
2012-04-02 22:41   ` Antti Palosaari
2012-04-02 21:25 ` Gianluca Gennari [this message]
2012-04-02 22:42   ` [PATCH 5/5] af9035: use module_usb_driver macro Antti Palosaari
2012-04-06 20:19 ` Re : [PATCH 0/5] af9035: support for tda18218 tuner, new USB IDs and more Sril

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=1333401917-27203-6-git-send-email-gennarone@gmail.com \
    --to=gennarone@gmail.com \
    --cc=crope@iki.fi \
    --cc=hfvogt@gmx.net \
    --cc=linux-media@vger.kernel.org \
    --cc=m@bues.ch \
    --cc=mchehab@redhat.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;
as well as URLs for NNTP newsgroup(s).