All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <weiyj.lk@gmail.com>
To: jkosina@suse.cz
Cc: yongjun_wei@trendmicro.com.cn, linux-input@vger.kernel.org
Subject: [PATCH -next] HID: use module_hid_driver() to simplify the code
Date: Fri, 23 Aug 2013 11:06:19 +0800	[thread overview]
Message-ID: <CAPgLHd9pb+49BC7BOOSrgkOWMQJQ76GcEGStt-UeaqGqtYfpFQ@mail.gmail.com> (raw)

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

module_hid_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/hid/hid-xinmo.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/hid/hid-xinmo.c b/drivers/hid/hid-xinmo.c
index 6153e50..7df5227 100644
--- a/drivers/hid/hid-xinmo.c
+++ b/drivers/hid/hid-xinmo.c
@@ -57,16 +57,5 @@ static struct hid_driver xinmo_driver = {
 	.event = xinmo_event
 };
 
-static int __init xinmo_init(void)
-{
-	return hid_register_driver(&xinmo_driver);
-}
-
-static void __exit xinmo_exit(void)
-{
-	hid_unregister_driver(&xinmo_driver);
-}
-
-module_init(xinmo_init);
-module_exit(xinmo_exit);
+module_hid_driver(xinmo_driver);
 MODULE_LICENSE("GPL");


             reply	other threads:[~2013-08-23  3:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-23  3:06 Wei Yongjun [this message]
2013-08-26 11:23 ` [PATCH -next] HID: use module_hid_driver() to simplify the code Jiri Kosina

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=CAPgLHd9pb+49BC7BOOSrgkOWMQJQ76GcEGStt-UeaqGqtYfpFQ@mail.gmail.com \
    --to=weiyj.lk@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.