]> Pileus Git - ~andy/linux/blobdiff - drivers/xen/tmem.c
Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma
[~andy/linux] / drivers / xen / tmem.c
index cc072c66c766523e4191c5cf4cd40762b77645a9..83b5c53bec6b6b0c06c7d9ec923df9676f17268b 100644 (file)
@@ -5,6 +5,8 @@
  * Author: Dan Magenheimer
  */
 
+#define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
@@ -379,17 +381,17 @@ static int xen_tmem_init(void)
 #ifdef CONFIG_FRONTSWAP
        if (tmem_enabled && frontswap) {
                char *s = "";
-               struct frontswap_ops *old_ops =
-                       frontswap_register_ops(&tmem_frontswap_ops);
+               struct frontswap_ops *old_ops;
 
                tmem_frontswap_poolid = -1;
+               old_ops = frontswap_register_ops(&tmem_frontswap_ops);
                if (IS_ERR(old_ops) || old_ops) {
                        if (IS_ERR(old_ops))
                                return PTR_ERR(old_ops);
                        s = " (WARNING: frontswap_ops overridden)";
                }
-               printk(KERN_INFO "frontswap enabled, RAM provided by "
-                                "Xen Transcendent Memory%s\n", s);
+               pr_info("frontswap enabled, RAM provided by Xen Transcendent Memory%s\n",
+                       s);
        }
 #endif
 #ifdef CONFIG_CLEANCACHE
@@ -400,8 +402,8 @@ static int xen_tmem_init(void)
                        cleancache_register_ops(&tmem_cleancache_ops);
                if (old_ops)
                        s = " (WARNING: cleancache_ops overridden)";
-               printk(KERN_INFO "cleancache enabled, RAM provided by "
-                                "Xen Transcendent Memory%s\n", s);
+               pr_info("cleancache enabled, RAM provided by Xen Transcendent Memory%s\n",
+                       s);
        }
 #endif
 #ifdef CONFIG_XEN_SELFBALLOONING