ACPI: event: Use pr_*() macros to replace printk()
authorHanjun Guo <guohanjun@huawei.com>
Wed, 2 Jun 2021 08:54:26 +0000 (16:54 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 7 Jun 2021 13:36:45 +0000 (15:36 +0200)
Introduce pr_fmt() and replace direct printk() invocation with
the matching pr_*() call to prepare for removing PREFIX.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/event.c

index 92e59f4..df38f3c 100644 (file)
@@ -7,6 +7,8 @@
  *
  */
 
+#define pr_fmt(fmt) "ACPI: " fmt
+
 #include <linux/spinlock.h>
 #include <linux/export.h>
 #include <linux/proc_fs.h>
@@ -173,8 +175,8 @@ static int __init acpi_event_init(void)
        /* create genetlink for acpi event */
        error = acpi_event_genetlink_init();
        if (error)
-               printk(KERN_WARNING PREFIX
-                      "Failed to create genetlink family for ACPI event\n");
+               pr_warn("Failed to create genetlink family for ACPI event\n");
+
        return 0;
 }