diff mbox

HID: corsair: Convert to use module_hid_driver

Message ID 1450256199.17220.1.camel@ingics.com (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Axel Lin Dec. 16, 2015, 8:56 a.m. UTC
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/hid/hid-corsair.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

Comments

Clément VUCHENER Dec. 20, 2015, 11:08 a.m. UTC | #1
2015-12-16 9:56 GMT+01:00 Axel Lin <axel.lin@ingics.com>:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
I am not sure if I am required to ack trivial patches, but no one answered.

I have no preference toward the old or new code. If it is the prefered
way to do that, I have no problem with it.

Acked-by: Clément Vuchener <clement.vuchener@gmail.com>
> ---
>  drivers/hid/hid-corsair.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/hid/hid-corsair.c b/drivers/hid/hid-corsair.c
> index bcefb9e..5855196 100644
> --- a/drivers/hid/hid-corsair.c
> +++ b/drivers/hid/hid-corsair.c
> @@ -655,18 +655,7 @@ static struct hid_driver corsair_driver = {
>         .input_mapping = corsair_input_mapping,
>  };
>
> -static int __init corsair_init(void)
> -{
> -       return hid_register_driver(&corsair_driver);
> -}
> -
> -static void corsair_exit(void)
> -{
> -       hid_unregister_driver(&corsair_driver);
> -}
> -
> -module_init(corsair_init);
> -module_exit(corsair_exit);
> +module_hid_driver(corsair_driver);
>
>  MODULE_LICENSE("GPL");
>  MODULE_AUTHOR("Clement Vuchener");
> --
> 2.1.4
>
>
>
--
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
Jiri Kosina Dec. 28, 2015, 12:12 p.m. UTC | #2
On Wed, 16 Dec 2015, Axel Lin wrote:

> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/hid/hid-corsair.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/drivers/hid/hid-corsair.c b/drivers/hid/hid-corsair.c
> index bcefb9e..5855196 100644
> --- a/drivers/hid/hid-corsair.c
> +++ b/drivers/hid/hid-corsair.c
> @@ -655,18 +655,7 @@ static struct hid_driver corsair_driver = {
>  	.input_mapping = corsair_input_mapping,
>  };
>  
> -static int __init corsair_init(void)
> -{
> -	return hid_register_driver(&corsair_driver);
> -}
> -
> -static void corsair_exit(void)
> -{
> -	hid_unregister_driver(&corsair_driver);
> -}
> -
> -module_init(corsair_init);
> -module_exit(corsair_exit);
> +module_hid_driver(corsair_driver);
>  
>  MODULE_LICENSE("GPL");
>  MODULE_AUTHOR("Clement Vuchener");

Applied to for-4.5/upstream.
diff mbox

Patch

diff --git a/drivers/hid/hid-corsair.c b/drivers/hid/hid-corsair.c
index bcefb9e..5855196 100644
--- a/drivers/hid/hid-corsair.c
+++ b/drivers/hid/hid-corsair.c
@@ -655,18 +655,7 @@  static struct hid_driver corsair_driver = {
 	.input_mapping = corsair_input_mapping,
 };
 
-static int __init corsair_init(void)
-{
-	return hid_register_driver(&corsair_driver);
-}
-
-static void corsair_exit(void)
-{
-	hid_unregister_driver(&corsair_driver);
-}
-
-module_init(corsair_init);
-module_exit(corsair_exit);
+module_hid_driver(corsair_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Clement Vuchener");