All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] HID: holtek-mouse: use module_hid_driver() to simplify the code
@ 2013-05-29 10:09 Wei Yongjun
  2013-05-29 13:05 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-05-29 10:09 UTC (permalink / raw)
  To: jkosina, chr.ohm; +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-holtek-mouse.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/hid/hid-holtek-mouse.c b/drivers/hid/hid-holtek-mouse.c
index 6a23ee6..7e6db3c 100644
--- a/drivers/hid/hid-holtek-mouse.c
+++ b/drivers/hid/hid-holtek-mouse.c
@@ -73,16 +73,5 @@ static struct hid_driver holtek_mouse_driver = {
 	.report_fixup = holtek_mouse_report_fixup,
 };
 
-static int __init holtek_mouse_init(void)
-{
-	return hid_register_driver(&holtek_mouse_driver);
-}
-
-static void __exit holtek_mouse_exit(void)
-{
-	hid_unregister_driver(&holtek_mouse_driver);
-}
-
-module_exit(holtek_mouse_exit);
-module_init(holtek_mouse_init);
+module_hid_driver(holtek_mouse_driver);
 MODULE_LICENSE("GPL");


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

* Re: [PATCH -next] HID: holtek-mouse: use module_hid_driver() to simplify the code
  2013-05-29 10:09 [PATCH -next] HID: holtek-mouse: use module_hid_driver() to simplify the code Wei Yongjun
@ 2013-05-29 13:05 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2013-05-29 13:05 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: chr.ohm, yongjun_wei, linux-input, Andy Shevchenko

On Wed, 29 May 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-holtek-mouse.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/drivers/hid/hid-holtek-mouse.c b/drivers/hid/hid-holtek-mouse.c
> index 6a23ee6..7e6db3c 100644
> --- a/drivers/hid/hid-holtek-mouse.c
> +++ b/drivers/hid/hid-holtek-mouse.c
> @@ -73,16 +73,5 @@ static struct hid_driver holtek_mouse_driver = {
>  	.report_fixup = holtek_mouse_report_fixup,
>  };
>  
> -static int __init holtek_mouse_init(void)
> -{
> -	return hid_register_driver(&holtek_mouse_driver);
> -}
> -
> -static void __exit holtek_mouse_exit(void)
> -{
> -	hid_unregister_driver(&holtek_mouse_driver);
> -}
> -
> -module_exit(holtek_mouse_exit);
> -module_init(holtek_mouse_init);
> +module_hid_driver(holtek_mouse_driver);
>  MODULE_LICENSE("GPL");

Added

	Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com>

and applied, thanks.

-- 
Jiri Kosina
SUSE Labs

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

end of thread, other threads:[~2013-05-29 13:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-29 10:09 [PATCH -next] HID: holtek-mouse: use module_hid_driver() to simplify the code Wei Yongjun
2013-05-29 13:05 ` Jiri Kosina

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.