[WATCHDOG] blackfin Watchdog driver: relocate all strings used in __init functions...
authorMike Frysinger <michael.frysinger@analog.com>
Wed, 30 Jan 2008 09:38:21 +0000 (17:38 +0800)
committerWim Van Sebroeck <wim@iguana.be>
Mon, 18 Feb 2008 16:54:11 +0000 (16:54 +0000)
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/bfin_wdt.c

index 472be10f0686646cc52fe5add98b3d64ff6dff11..1237113dc14a662df47b5f8e8ec4ef7fd67938ea 100644 (file)
@@ -29,6 +29,7 @@
 
 #define stamp(fmt, args...) pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args)
 #define stampit() stamp("here i am")
+#define pr_init(fmt, args...) ({ static const __initdata char __fmt[] = fmt; printk(__fmt, ## args); })
 
 #define WATCHDOG_NAME "bfin-wdt"
 #define PFX WATCHDOG_NAME ": "
@@ -445,19 +446,19 @@ static int __init bfin_wdt_init(void)
 
        ret = register_reboot_notifier(&bfin_wdt_notifier);
        if (ret) {
-               printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", ret);
+               pr_init(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", ret);
                return ret;
        }
 
        ret = misc_register(&bfin_wdt_miscdev);
        if (ret) {
-               printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
+               pr_init(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
                       WATCHDOG_MINOR, ret);
                unregister_reboot_notifier(&bfin_wdt_notifier);
                return ret;
        }
 
-       printk(KERN_INFO PFX "initialized: timeout=%d sec (nowayout=%d)\n",
+       pr_init(KERN_INFO PFX "initialized: timeout=%d sec (nowayout=%d)\n",
               timeout, nowayout);
 
        return 0;