diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 20:03:26 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 20:03:26 (GMT) |
commit | 750f77064a290beb162352077b52c61b04bcae0e (patch) | |
tree | 736a8dd043dc4cda298762a80e7c1fbf1bb87742 /drivers/watchdog/bfin_wdt.c | |
parent | 89e5d6f0d979f6e7dc2bbb1ebd9e239217e2e952 (diff) | |
parent | b92c803ec61de59e6e4ab9b2748d8e633cec3f08 (diff) | |
download | linux-fsl-qoriq-750f77064a290beb162352077b52c61b04bcae0e.tar.xz |
Merge git://www.linux-watchdog.org/linux-watchdog
Pull watchdog updates from Wim Van Sebroeck:
- Removal of the Documentation/watchdog/00-INDEX file
- Fix boot status reporting for imx2_wdt
- clean-up sp805_wdt, pnx4008_wdt and mpcore_wdt
- convert printk in watchdog drivers to pr_ functions
- change nowayout module parameter to bool for every watchdog device
- conversion of jz4740_wdt, pnx4008_wdt, max63xx_wdt, softdog,
ep93xx_wdt, coh901327 and txx9wdt to new watchdog API
- Add support for the WDIOC_GETTIMELEFT ioctl call to the new watchdog
API
- Change the new watchdog API so that the driver updates the timeout
value
- two fixes for the xen_wdt driver
Fix up conflicts in ep93xx driver due to the same patches being merged
through separate branches.
* git://www.linux-watchdog.org/linux-watchdog: (33 commits)
watchdog: txx9wdt: fix timeout
watchdog: Convert txx9wdt driver to watchdog framework
watchdog: coh901327_wdt.c: fix timeout
watchdog: coh901327: convert to use watchdog core
watchdog: Add support for WDIOC_GETTIMELEFT IOCTL in watchdog core
watchdog: ep93xx_wdt: timeout is an unsigned int value.
watchdog: ep93xx_wdt: Fix timeout after conversion to watchdog core
watchdog: Convert ep93xx driver to watchdog core
watchdog: sp805: Use devm routines
watchdog: sp805: replace readl/writel with lighter _relaxed variants
watchdog: sp805: Fix documentation style comment
watchdog: mpcore_wdt: Allow platform_get_irq() to fail
watchdog: mpcore_wdt: Use devm routines
watchdog: mpcore_wdt: Rename dev to pdev for pointing to struct platform_device
watchdog: xen: don't clear is_active when xen_wdt_stop() failed
watchdog: xen: don't unconditionally enable the watchdog during resume
watchdog: fix compiler error for missing parenthesis
watchdog: ep93xx_wdt.c: fix platform probe
watchdog: ep93xx: Convert the watchdog driver into a platform device.
watchdog: fix set_timeout operations
...
Diffstat (limited to 'drivers/watchdog/bfin_wdt.c')
-rw-r--r-- | drivers/watchdog/bfin_wdt.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/drivers/watchdog/bfin_wdt.c b/drivers/watchdog/bfin_wdt.c index b9fa9b7..38bc383 100644 --- a/drivers/watchdog/bfin_wdt.c +++ b/drivers/watchdog/bfin_wdt.c @@ -11,6 +11,8 @@ * Licensed under the GPL-2 or later. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/platform_device.h> #include <linux/module.h> #include <linux/moduleparam.h> @@ -28,15 +30,8 @@ #define stamp(fmt, args...) \ pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args) #define stampit() stamp("here i am") -#define pr_devinit(fmt, args...) \ - ({ static const __devinitconst char __fmt[] = fmt; \ - printk(__fmt, ## args); }) -#define pr_init(fmt, args...) \ - ({ static const __initconst char __fmt[] = fmt; \ - printk(__fmt, ## args); }) #define WATCHDOG_NAME "bfin-wdt" -#define PFX WATCHDOG_NAME ": " /* The BF561 has two watchdogs (one per core), but since Linux * only runs on core A, we'll just work with that one. @@ -54,7 +49,7 @@ #define WATCHDOG_TIMEOUT 20 static unsigned int timeout = WATCHDOG_TIMEOUT; -static int nowayout = WATCHDOG_NOWAYOUT; +static bool nowayout = WATCHDOG_NOWAYOUT; static const struct watchdog_info bfin_wdt_info; static unsigned long open_check; static char expect_close; @@ -126,7 +121,7 @@ static int bfin_wdt_set_timeout(unsigned long t) stamp("maxtimeout=%us newtimeout=%lus (cnt=%#x)", max_t, t, cnt); if (t > max_t) { - printk(KERN_WARNING PFX "timeout value is too large\n"); + pr_warn("timeout value is too large\n"); return -EINVAL; } @@ -182,8 +177,7 @@ static int bfin_wdt_release(struct inode *inode, struct file *file) if (expect_close == 42) bfin_wdt_stop(); else { - printk(KERN_CRIT PFX - "Unexpected close, not stopping watchdog!\n"); + pr_crit("Unexpected close, not stopping watchdog!\n"); bfin_wdt_keepalive(); } expect_close = 0; @@ -368,14 +362,13 @@ static int __devinit bfin_wdt_probe(struct platform_device *pdev) ret = misc_register(&bfin_wdt_miscdev); if (ret) { - pr_devinit(KERN_ERR PFX - "cannot register miscdev on minor=%d (err=%d)\n", - WATCHDOG_MINOR, ret); + pr_err("cannot register miscdev on minor=%d (err=%d)\n", + WATCHDOG_MINOR, ret); return ret; } - pr_devinit(KERN_INFO PFX "initialized: timeout=%d sec (nowayout=%d)\n", - timeout, nowayout); + pr_info("initialized: timeout=%d sec (nowayout=%d)\n", + timeout, nowayout); return 0; } @@ -439,14 +432,14 @@ static int __init bfin_wdt_init(void) */ ret = platform_driver_register(&bfin_wdt_driver); if (ret) { - pr_init(KERN_ERR PFX "unable to register driver\n"); + pr_err("unable to register driver\n"); return ret; } bfin_wdt_device = platform_device_register_simple(WATCHDOG_NAME, -1, NULL, 0); if (IS_ERR(bfin_wdt_device)) { - pr_init(KERN_ERR PFX "unable to register device\n"); + pr_err("unable to register device\n"); platform_driver_unregister(&bfin_wdt_driver); return PTR_ERR(bfin_wdt_device); } @@ -479,7 +472,7 @@ MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. (1<=timeout<=((2^32)/SCLK), default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ")"); -module_param(nowayout, int, 0); +module_param(nowayout, bool, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |