diff mbox series

[4/5] watchdog: intel_scu: make it explicitly non-modular

Message ID 1556034515-28792-5-git-send-email-paul.gortmaker@windriver.com (mailing list archive)
State Accepted
Headers show
Series wdt: clean up unused modular infrastructure | expand

Commit Message

Paul Gortmaker April 23, 2019, 3:48 p.m. UTC
The Kconfig currently controlling compilation of this code is:

config INTEL_SCU_WATCHDOG
       bool "Intel SCU Watchdog for Mobile Platforms"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

We leave the moduleparam.h include since the file does declare some
module parameters, and leaving them as such is currently the easiest
way to remain compatible with existing boot arg use cases.

Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-watchdog@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/watchdog/intel_scu_watchdog.c | 18 ------------------
 1 file changed, 18 deletions(-)

Comments

Guenter Roeck April 29, 2019, 4:37 p.m. UTC | #1
On Tue, Apr 23, 2019 at 11:48:34AM -0400, Paul Gortmaker wrote:
> The Kconfig currently controlling compilation of this code is:
> 
> config INTEL_SCU_WATCHDOG
>        bool "Intel SCU Watchdog for Mobile Platforms"
> 
> ...meaning that it currently is not being built as a module by anyone.
> 
> Lets remove the modular code that is essentially orphaned, so that
> when reading the driver there is no doubt it is builtin-only.
> 
> We also delete the MODULE_LICENSE tag etc. since all that information
> is already contained at the top of the file in the comments.
> 
> We leave the moduleparam.h include since the file does declare some
> module parameters, and leaving them as such is currently the easiest
> way to remain compatible with existing boot arg use cases.
> 
> Cc: Wim Van Sebroeck <wim@iguana.be>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: linux-watchdog@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

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

> ---
>  drivers/watchdog/intel_scu_watchdog.c | 18 ------------------
>  1 file changed, 18 deletions(-)
> 
> diff --git a/drivers/watchdog/intel_scu_watchdog.c b/drivers/watchdog/intel_scu_watchdog.c
> index 0caab6241eb7..32bc5611f0cc 100644
> --- a/drivers/watchdog/intel_scu_watchdog.c
> +++ b/drivers/watchdog/intel_scu_watchdog.c
> @@ -25,7 +25,6 @@
>  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>  
>  #include <linux/compiler.h>
> -#include <linux/module.h>
>  #include <linux/kernel.h>
>  #include <linux/moduleparam.h>
>  #include <linux/types.h>
> @@ -545,21 +544,4 @@ static int __init intel_scu_watchdog_init(void)
>  	iounmap(watchdog_device.timer_load_count_addr);
>  	return ret;
>  }
> -
> -static void __exit intel_scu_watchdog_exit(void)
> -{
> -
> -	misc_deregister(&watchdog_device.miscdev);
> -	unregister_reboot_notifier(&watchdog_device.intel_scu_notifier);
> -	/* disable the timer */
> -	iowrite32(0x00000002, watchdog_device.timer_control_addr);
> -	iounmap(watchdog_device.timer_load_count_addr);
> -}
> -
>  late_initcall(intel_scu_watchdog_init);
> -module_exit(intel_scu_watchdog_exit);
> -
> -MODULE_AUTHOR("Intel Corporation");
> -MODULE_DESCRIPTION("Intel SCU Watchdog Device Driver");
> -MODULE_LICENSE("GPL");
> -MODULE_VERSION(WDT_VER);
diff mbox series

Patch

diff --git a/drivers/watchdog/intel_scu_watchdog.c b/drivers/watchdog/intel_scu_watchdog.c
index 0caab6241eb7..32bc5611f0cc 100644
--- a/drivers/watchdog/intel_scu_watchdog.c
+++ b/drivers/watchdog/intel_scu_watchdog.c
@@ -25,7 +25,6 @@ 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/compiler.h>
-#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/moduleparam.h>
 #include <linux/types.h>
@@ -545,21 +544,4 @@  static int __init intel_scu_watchdog_init(void)
 	iounmap(watchdog_device.timer_load_count_addr);
 	return ret;
 }
-
-static void __exit intel_scu_watchdog_exit(void)
-{
-
-	misc_deregister(&watchdog_device.miscdev);
-	unregister_reboot_notifier(&watchdog_device.intel_scu_notifier);
-	/* disable the timer */
-	iowrite32(0x00000002, watchdog_device.timer_control_addr);
-	iounmap(watchdog_device.timer_load_count_addr);
-}
-
 late_initcall(intel_scu_watchdog_init);
-module_exit(intel_scu_watchdog_exit);
-
-MODULE_AUTHOR("Intel Corporation");
-MODULE_DESCRIPTION("Intel SCU Watchdog Device Driver");
-MODULE_LICENSE("GPL");
-MODULE_VERSION(WDT_VER);