diff mbox

[-next] HID: steelseries: use module_hid_driver() to simplify the code

Message ID CAPgLHd_6y1mr1moejftWGgrpO=vGxQUZ5Dz2v022kaFHdF-pVg@mail.gmail.com
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Wei Yongjun March 15, 2013, 3:07 p.m. UTC
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-steelseries.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jiri Kosina March 18, 2013, 9:53 a.m. UTC | #1
On Fri, 15 Mar 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-steelseries.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-steelseries.c
> index 98e66ac..9b0efb0 100644
> --- a/drivers/hid/hid-steelseries.c
> +++ b/drivers/hid/hid-steelseries.c
> @@ -377,16 +377,5 @@ static struct hid_driver steelseries_srws1_driver = {
>  	.report_fixup = steelseries_srws1_report_fixup
>  };
>  
> -static int __init steelseries_srws1_init(void)
> -{
> -	return hid_register_driver(&steelseries_srws1_driver);
> -}
> -
> -static void __exit steelseries_srws1_exit(void)
> -{
> -	hid_unregister_driver(&steelseries_srws1_driver);
> -}
> -
> -module_init(steelseries_srws1_init);
> -module_exit(steelseries_srws1_exit);
> +module_hid_driver(steelseries_srws1_driver);
>  MODULE_LICENSE("GPL");

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-steelseries.c
index 98e66ac..9b0efb0 100644
--- a/drivers/hid/hid-steelseries.c
+++ b/drivers/hid/hid-steelseries.c
@@ -377,16 +377,5 @@  static struct hid_driver steelseries_srws1_driver = {
 	.report_fixup = steelseries_srws1_report_fixup
 };
 
-static int __init steelseries_srws1_init(void)
-{
-	return hid_register_driver(&steelseries_srws1_driver);
-}
-
-static void __exit steelseries_srws1_exit(void)
-{
-	hid_unregister_driver(&steelseries_srws1_driver);
-}
-
-module_init(steelseries_srws1_init);
-module_exit(steelseries_srws1_exit);
+module_hid_driver(steelseries_srws1_driver);
 MODULE_LICENSE("GPL");