linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] HID: use module_hid_driver() to simplify the code
@ 2013-08-23  3:06 Wei Yongjun
  2013-08-26 11:23 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-08-23  3:06 UTC (permalink / raw)
  To: jkosina; +Cc: yongjun_wei, linux-input

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");


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] HID: use module_hid_driver() to simplify the code
  2013-08-23  3:06 [PATCH -next] HID: use module_hid_driver() to simplify the code Wei Yongjun
@ 2013-08-26 11:23 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2013-08-26 11:23 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: yongjun_wei, linux-input

On Fri, 23 Aug 2013, Wei Yongjun wrote:

> 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");

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-26 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-23  3:06 [PATCH -next] HID: use module_hid_driver() to simplify the code Wei Yongjun
2013-08-26 11:23 ` Jiri Kosina

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).