aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-10-28 04:05:53 -0400
committerWim Van Sebroeck <wim@iguana.be>2012-12-19 16:25:06 -0500
commit77e0dfcc0949303bbae75cac5c598c59e67b54c9 (patch)
tree6a9d049ffe9ad38327ce307ddcfba35f41732c8a /drivers/watchdog
parent312b00e1c31011dd009f51a52e14a500f61f1f31 (diff)
watchdog: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
dev_<level> calls take less code than dev_printk(KERN_<LEVEL> and reducing object size is good. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/mpcore_wdt.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c
index a84eb551ea27..233cfadcb21f 100644
--- a/drivers/watchdog/mpcore_wdt.c
+++ b/drivers/watchdog/mpcore_wdt.c
@@ -80,8 +80,7 @@ static irqreturn_t mpcore_wdt_fire(int irq, void *arg)
80 80
81 /* Check it really was our interrupt */ 81 /* Check it really was our interrupt */
82 if (readl(wdt->base + TWD_WDOG_INTSTAT)) { 82 if (readl(wdt->base + TWD_WDOG_INTSTAT)) {
83 dev_printk(KERN_CRIT, wdt->dev, 83 dev_crit(wdt->dev, "Triggered - Reboot ignored\n");
84 "Triggered - Reboot ignored.\n");
85 /* Clear the interrupt on the watchdog */ 84 /* Clear the interrupt on the watchdog */
86 writel(1, wdt->base + TWD_WDOG_INTSTAT); 85 writel(1, wdt->base + TWD_WDOG_INTSTAT);
87 return IRQ_HANDLED; 86 return IRQ_HANDLED;
@@ -123,7 +122,7 @@ static void mpcore_wdt_stop(struct mpcore_wdt *wdt)
123 122
124static void mpcore_wdt_start(struct mpcore_wdt *wdt) 123static void mpcore_wdt_start(struct mpcore_wdt *wdt)
125{ 124{
126 dev_printk(KERN_INFO, wdt->dev, "enabling watchdog.\n"); 125 dev_info(wdt->dev, "enabling watchdog\n");
127 126
128 /* This loads the count register but does NOT start the count yet */ 127 /* This loads the count register but does NOT start the count yet */
129 mpcore_wdt_keepalive(wdt); 128 mpcore_wdt_keepalive(wdt);
@@ -180,8 +179,8 @@ static int mpcore_wdt_release(struct inode *inode, struct file *file)
180 if (wdt->expect_close == 42) 179 if (wdt->expect_close == 42)
181 mpcore_wdt_stop(wdt); 180 mpcore_wdt_stop(wdt);
182 else { 181 else {
183 dev_printk(KERN_CRIT, wdt->dev, 182 dev_crit(wdt->dev,
184 "unexpected close, not stopping watchdog!\n"); 183 "unexpected close, not stopping watchdog!\n");
185 mpcore_wdt_keepalive(wdt); 184 mpcore_wdt_keepalive(wdt);
186 } 185 }
187 clear_bit(0, &wdt->timer_alive); 186 clear_bit(0, &wdt->timer_alive);
@@ -351,9 +350,9 @@ static int mpcore_wdt_probe(struct platform_device *pdev)
351 ret = devm_request_irq(wdt->dev, wdt->irq, mpcore_wdt_fire, 0, 350 ret = devm_request_irq(wdt->dev, wdt->irq, mpcore_wdt_fire, 0,
352 "mpcore_wdt", wdt); 351 "mpcore_wdt", wdt);
353 if (ret) { 352 if (ret) {
354 dev_printk(KERN_ERR, wdt->dev, 353 dev_err(wdt->dev,
355 "cannot register IRQ%d for watchdog\n", 354 "cannot register IRQ%d for watchdog\n",
356 wdt->irq); 355 wdt->irq);
357 return ret; 356 return ret;
358 } 357 }
359 } 358 }
@@ -365,9 +364,9 @@ static int mpcore_wdt_probe(struct platform_device *pdev)
365 mpcore_wdt_miscdev.parent = &pdev->dev; 364 mpcore_wdt_miscdev.parent = &pdev->dev;
366 ret = misc_register(&mpcore_wdt_miscdev); 365 ret = misc_register(&mpcore_wdt_miscdev);
367 if (ret) { 366 if (ret) {
368 dev_printk(KERN_ERR, wdt->dev, 367 dev_err(wdt->dev,
369 "cannot register miscdev on minor=%d (err=%d)\n", 368 "cannot register miscdev on minor=%d (err=%d)\n",
370 WATCHDOG_MINOR, ret); 369 WATCHDOG_MINOR, ret);
371 return ret; 370 return ret;
372 } 371 }
373 372