public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: pcwd: Utilize the module_isa_driver macro
@ 2016-06-01 13:05 William Breathitt Gray
  2016-06-01 13:20 ` Guenter Roeck
  2016-07-17 19:49 ` Wim Van Sebroeck
  0 siblings, 2 replies; 3+ messages in thread
From: William Breathitt Gray @ 2016-06-01 13:05 UTC (permalink / raw)
  To: wim, linux; +Cc: linux-watchdog, linux-kernel

This driver does not do anything special in module init/exit. This patch
eliminates the module init/exit boilerplate code by utilizing the
module_isa_driver macro.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
 drivers/watchdog/pcwd.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/watchdog/pcwd.c b/drivers/watchdog/pcwd.c
index e936f15..3ad5206 100644
--- a/drivers/watchdog/pcwd.c
+++ b/drivers/watchdog/pcwd.c
@@ -992,19 +992,7 @@ static struct isa_driver pcwd_isa_driver = {
 	},
 };
 
-static int __init pcwd_init_module(void)
-{
-	return isa_register_driver(&pcwd_isa_driver, PCWD_ISA_NR_CARDS);
-}
-
-static void __exit pcwd_cleanup_module(void)
-{
-	isa_unregister_driver(&pcwd_isa_driver);
-	pr_info("Watchdog Module Unloaded\n");
-}
-
-module_init(pcwd_init_module);
-module_exit(pcwd_cleanup_module);
+module_isa_driver(pcwd_isa_driver, PCWD_ISA_NR_CARDS);
 
 MODULE_AUTHOR("Ken Hollis <kenji@bitgate.com>, "
 		"Wim Van Sebroeck <wim@iguana.be>");
-- 
2.7.3

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

* Re: [PATCH] watchdog: pcwd: Utilize the module_isa_driver macro
  2016-06-01 13:05 [PATCH] watchdog: pcwd: Utilize the module_isa_driver macro William Breathitt Gray
@ 2016-06-01 13:20 ` Guenter Roeck
  2016-07-17 19:49 ` Wim Van Sebroeck
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2016-06-01 13:20 UTC (permalink / raw)
  To: William Breathitt Gray, wim; +Cc: linux-watchdog, linux-kernel

On 06/01/2016 06:05 AM, William Breathitt Gray wrote:
> This driver does not do anything special in module init/exit. This patch
> eliminates the module init/exit boilerplate code by utilizing the
> module_isa_driver macro.
>
> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/pcwd.c | 14 +-------------
>   1 file changed, 1 insertion(+), 13 deletions(-)
>
> diff --git a/drivers/watchdog/pcwd.c b/drivers/watchdog/pcwd.c
> index e936f15..3ad5206 100644
> --- a/drivers/watchdog/pcwd.c
> +++ b/drivers/watchdog/pcwd.c
> @@ -992,19 +992,7 @@ static struct isa_driver pcwd_isa_driver = {
>   	},
>   };
>
> -static int __init pcwd_init_module(void)
> -{
> -	return isa_register_driver(&pcwd_isa_driver, PCWD_ISA_NR_CARDS);
> -}
> -
> -static void __exit pcwd_cleanup_module(void)
> -{
> -	isa_unregister_driver(&pcwd_isa_driver);
> -	pr_info("Watchdog Module Unloaded\n");
> -}
> -
> -module_init(pcwd_init_module);
> -module_exit(pcwd_cleanup_module);
> +module_isa_driver(pcwd_isa_driver, PCWD_ISA_NR_CARDS);
>
>   MODULE_AUTHOR("Ken Hollis <kenji@bitgate.com>, "
>   		"Wim Van Sebroeck <wim@iguana.be>");
>

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

* Re: [PATCH] watchdog: pcwd: Utilize the module_isa_driver macro
  2016-06-01 13:05 [PATCH] watchdog: pcwd: Utilize the module_isa_driver macro William Breathitt Gray
  2016-06-01 13:20 ` Guenter Roeck
@ 2016-07-17 19:49 ` Wim Van Sebroeck
  1 sibling, 0 replies; 3+ messages in thread
From: Wim Van Sebroeck @ 2016-07-17 19:49 UTC (permalink / raw)
  To: William Breathitt Gray; +Cc: linux, linux-watchdog, linux-kernel

Hi William,

> This driver does not do anything special in module init/exit. This patch
> eliminates the module init/exit boilerplate code by utilizing the
> module_isa_driver macro.
> 
> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
> ---
>  drivers/watchdog/pcwd.c | 14 +-------------
>  1 file changed, 1 insertion(+), 13 deletions(-)
> 
> diff --git a/drivers/watchdog/pcwd.c b/drivers/watchdog/pcwd.c
> index e936f15..3ad5206 100644
> --- a/drivers/watchdog/pcwd.c
> +++ b/drivers/watchdog/pcwd.c
> @@ -992,19 +992,7 @@ static struct isa_driver pcwd_isa_driver = {
>  	},
>  };
>  
> -static int __init pcwd_init_module(void)
> -{
> -	return isa_register_driver(&pcwd_isa_driver, PCWD_ISA_NR_CARDS);
> -}
> -
> -static void __exit pcwd_cleanup_module(void)
> -{
> -	isa_unregister_driver(&pcwd_isa_driver);
> -	pr_info("Watchdog Module Unloaded\n");
> -}
> -
> -module_init(pcwd_init_module);
> -module_exit(pcwd_cleanup_module);
> +module_isa_driver(pcwd_isa_driver, PCWD_ISA_NR_CARDS);
>  
>  MODULE_AUTHOR("Ken Hollis <kenji@bitgate.com>, "
>  		"Wim Van Sebroeck <wim@iguana.be>");
> -- 
> 2.7.3
> 

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.

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

end of thread, other threads:[~2016-07-17 19:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-01 13:05 [PATCH] watchdog: pcwd: Utilize the module_isa_driver macro William Breathitt Gray
2016-06-01 13:20 ` Guenter Roeck
2016-07-17 19:49 ` Wim Van Sebroeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox