watchdog: use dev_ functions
authorAlan Cox <alan@linux.intel.com>
Fri, 11 May 2012 10:00:22 +0000 (12:00 +0200)
committerWim Van Sebroeck <wim@iguana.be>
Wed, 30 May 2012 05:54:57 +0000 (07:54 +0200)
While they are registered all our watchdogs now have a valid device object
so we can in turn use that to report problems nicely.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/watchdog_dev.c

index 1f011f2d6e48f86796be505bf9e4ab3d2756c050..55191cccf026b96009ca536938ce930571dd4485 100644 (file)
@@ -108,8 +108,7 @@ static int watchdog_stop(struct watchdog_device *wddev)
        int err = -EBUSY;
 
        if (test_bit(WDOG_NO_WAY_OUT, &wddev->status)) {
-               pr_info("%s: nowayout prevents watchdog to be stopped!\n",
-                                                       wddev->info->identity);
+               dev_info(wddev->dev, "nowayout prevents watchdog being stopped!\n");
                return err;
        }
 
@@ -324,7 +323,7 @@ static int watchdog_release(struct inode *inode, struct file *file)
 
        /* If the watchdog was not stopped, send a keepalive ping */
        if (err < 0) {
-               pr_crit("%s: watchdog did not stop!\n", wdd->info->identity);
+               dev_crit(wdd->dev, "watchdog did not stop!\n");
                watchdog_ping(wdd);
        }