diff options
Diffstat (limited to 'drivers/watchdog/gef_wdt.c')
| -rw-r--r-- | drivers/watchdog/gef_wdt.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c index b146082bd85..25beb30878d 100644 --- a/drivers/watchdog/gef_wdt.c +++ b/drivers/watchdog/gef_wdt.c @@ -24,6 +24,8 @@ * capabilities) a kernel-based watchdog. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/kernel.h> #include <linux/compiler.h> #include <linux/init.h> @@ -32,6 +34,7 @@ #include <linux/watchdog.h> #include <linux/fs.h> #include <linux/of.h> +#include <linux/of_address.h> #include <linux/of_platform.h> #include <linux/io.h> #include <linux/uaccess.h> @@ -68,8 +71,8 @@ static unsigned int bus_clk; static char expect_close; static DEFINE_SPINLOCK(gef_wdt_spinlock); -static int nowayout = WATCHDOG_NOWAYOUT; -module_param(nowayout, int, 0); +static bool nowayout = WATCHDOG_NOWAYOUT; +module_param(nowayout, bool, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); @@ -110,7 +113,7 @@ static void gef_wdt_handler_enable(void) if (gef_wdt_toggle_wdc(GEF_WDC_ENABLED_FALSE, GEF_WDC_ENABLE_SHIFT)) { gef_wdt_service(); - printk(KERN_NOTICE "gef_wdt: watchdog activated\n"); + pr_notice("watchdog activated\n"); } } @@ -118,7 +121,7 @@ static void gef_wdt_handler_disable(void) { if (gef_wdt_toggle_wdc(GEF_WDC_ENABLED_TRUE, GEF_WDC_ENABLE_SHIFT)) - printk(KERN_NOTICE "gef_wdt: watchdog deactivated\n"); + pr_notice("watchdog deactivated\n"); } static void gef_wdt_set_timeout(unsigned int timeout) @@ -234,8 +237,7 @@ static int gef_wdt_release(struct inode *inode, struct file *file) if (expect_close == 42) gef_wdt_handler_disable(); else { - printk(KERN_CRIT - "gef_wdt: unexpected close, not stopping timer!\n"); + pr_crit("unexpected close, not stopping timer!\n"); gef_wdt_service(); } expect_close = 0; @@ -261,7 +263,7 @@ static struct miscdevice gef_wdt_miscdev = { }; -static int __devinit gef_wdt_probe(struct platform_device *dev) +static int gef_wdt_probe(struct platform_device *dev) { int timeout = 10; u32 freq; @@ -284,7 +286,7 @@ static int __devinit gef_wdt_probe(struct platform_device *dev) return misc_register(&gef_wdt_miscdev); } -static int __devexit gef_wdt_remove(struct platform_device *dev) +static int gef_wdt_remove(struct platform_device *dev) { misc_deregister(&gef_wdt_miscdev); @@ -309,11 +311,12 @@ static struct platform_driver gef_wdt_driver = { .of_match_table = gef_wdt_ids, }, .probe = gef_wdt_probe, + .remove = gef_wdt_remove, }; static int __init gef_wdt_init(void) { - printk(KERN_INFO "GE watchdog driver\n"); + pr_info("GE watchdog driver\n"); return platform_driver_register(&gef_wdt_driver); } @@ -328,5 +331,4 @@ module_exit(gef_wdt_exit); MODULE_AUTHOR("Martyn Welch <martyn.welch@ge.com>"); MODULE_DESCRIPTION("GE watchdog driver"); MODULE_LICENSE("GPL"); -MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_ALIAS("platform:gef_wdt"); |
