diff options
Diffstat (limited to 'drivers/watchdog/cpwd.c')
-rw-r--r-- | drivers/watchdog/cpwd.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index 1b793dfd868f..95b1b954de1b 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c | |||
@@ -14,6 +14,8 @@ | |||
14 | * Copyright (C) 2008 David S. Miller <davem@davemloft.net> | 14 | * Copyright (C) 2008 David S. Miller <davem@davemloft.net> |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
18 | |||
17 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
18 | #include <linux/module.h> | 20 | #include <linux/module.h> |
19 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
@@ -35,7 +37,6 @@ | |||
35 | #include <asm/watchdog.h> | 37 | #include <asm/watchdog.h> |
36 | 38 | ||
37 | #define DRIVER_NAME "cpwd" | 39 | #define DRIVER_NAME "cpwd" |
38 | #define PFX DRIVER_NAME ": " | ||
39 | 40 | ||
40 | #define WD_OBPNAME "watchdog" | 41 | #define WD_OBPNAME "watchdog" |
41 | #define WD_BADMODEL "SUNW,501-5336" | 42 | #define WD_BADMODEL "SUNW,501-5336" |
@@ -385,8 +386,7 @@ static int cpwd_open(struct inode *inode, struct file *f) | |||
385 | if (!p->initialized) { | 386 | if (!p->initialized) { |
386 | if (request_irq(p->irq, &cpwd_interrupt, | 387 | if (request_irq(p->irq, &cpwd_interrupt, |
387 | IRQF_SHARED, DRIVER_NAME, p)) { | 388 | IRQF_SHARED, DRIVER_NAME, p)) { |
388 | printk(KERN_ERR PFX "Cannot register IRQ %d\n", | 389 | pr_err("Cannot register IRQ %d\n", p->irq); |
389 | p->irq); | ||
390 | mutex_unlock(&cpwd_mutex); | 390 | mutex_unlock(&cpwd_mutex); |
391 | return -EBUSY; | 391 | return -EBUSY; |
392 | } | 392 | } |
@@ -542,7 +542,7 @@ static int __devinit cpwd_probe(struct platform_device *op) | |||
542 | p = kzalloc(sizeof(*p), GFP_KERNEL); | 542 | p = kzalloc(sizeof(*p), GFP_KERNEL); |
543 | err = -ENOMEM; | 543 | err = -ENOMEM; |
544 | if (!p) { | 544 | if (!p) { |
545 | printk(KERN_ERR PFX "Unable to allocate struct cpwd.\n"); | 545 | pr_err("Unable to allocate struct cpwd\n"); |
546 | goto out; | 546 | goto out; |
547 | } | 547 | } |
548 | 548 | ||
@@ -553,14 +553,14 @@ static int __devinit cpwd_probe(struct platform_device *op) | |||
553 | p->regs = of_ioremap(&op->resource[0], 0, | 553 | p->regs = of_ioremap(&op->resource[0], 0, |
554 | 4 * WD_TIMER_REGSZ, DRIVER_NAME); | 554 | 4 * WD_TIMER_REGSZ, DRIVER_NAME); |
555 | if (!p->regs) { | 555 | if (!p->regs) { |
556 | printk(KERN_ERR PFX "Unable to map registers.\n"); | 556 | pr_err("Unable to map registers\n"); |
557 | goto out_free; | 557 | goto out_free; |
558 | } | 558 | } |
559 | 559 | ||
560 | options = of_find_node_by_path("/options"); | 560 | options = of_find_node_by_path("/options"); |
561 | err = -ENODEV; | 561 | err = -ENODEV; |
562 | if (!options) { | 562 | if (!options) { |
563 | printk(KERN_ERR PFX "Unable to find /options node.\n"); | 563 | pr_err("Unable to find /options node\n"); |
564 | goto out_iounmap; | 564 | goto out_iounmap; |
565 | } | 565 | } |
566 | 566 | ||
@@ -605,8 +605,8 @@ static int __devinit cpwd_probe(struct platform_device *op) | |||
605 | 605 | ||
606 | err = misc_register(&p->devs[i].misc); | 606 | err = misc_register(&p->devs[i].misc); |
607 | if (err) { | 607 | if (err) { |
608 | printk(KERN_ERR "Could not register misc device for " | 608 | pr_err("Could not register misc device for dev %d\n", |
609 | "dev %d\n", i); | 609 | i); |
610 | goto out_unregister; | 610 | goto out_unregister; |
611 | } | 611 | } |
612 | } | 612 | } |
@@ -617,8 +617,8 @@ static int __devinit cpwd_probe(struct platform_device *op) | |||
617 | cpwd_timer.data = (unsigned long) p; | 617 | cpwd_timer.data = (unsigned long) p; |
618 | cpwd_timer.expires = WD_BTIMEOUT; | 618 | cpwd_timer.expires = WD_BTIMEOUT; |
619 | 619 | ||
620 | printk(KERN_INFO PFX "PLD defect workaround enabled for " | 620 | pr_info("PLD defect workaround enabled for model %s\n", |
621 | "model " WD_BADMODEL ".\n"); | 621 | WD_BADMODEL); |
622 | } | 622 | } |
623 | 623 | ||
624 | dev_set_drvdata(&op->dev, p); | 624 | dev_set_drvdata(&op->dev, p); |