summaryrefslogtreecommitdiff
path: root/drivers/acpi/sbshc.c
diff options
context:
space:
mode:
authorHanjun Guo <guohanjun@huawei.com>2021-06-02 16:54:36 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-06-07 15:36:46 +0200
commitbd10c13b7775d79e5925c66aeaa6ff64c10c3992 (patch)
tree2dab4de049c279362f2de3e4c175f6077303367d /drivers/acpi/sbshc.c
parent86ca3b0ab41f7172b963a38074612f8e5f1851e1 (diff)
ACPI: sbshc: Unify the message printing
Using pr_fmt() and pr_*() macros to unify the message printing. Signed-off-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/sbshc.c')
-rw-r--r--drivers/acpi/sbshc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index 53c2862c4c75..d69a2a84c83c 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -5,6 +5,8 @@
* Copyright (c) 2007 Alexey Starikovskiy
*/
+#define pr_fmt(fmt) "ACPI: " fmt
+
#include <linux/acpi.h>
#include <linux/wait.h>
#include <linux/slab.h>
@@ -13,8 +15,6 @@
#include <linux/interrupt.h>
#include "sbshc.h"
-#define PREFIX "ACPI: "
-
#define ACPI_SMB_HC_CLASS "smbus_host_ctl"
#define ACPI_SMB_HC_DEVICE_NAME "ACPI SMBus HC"
@@ -109,7 +109,7 @@ static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol,
u8 temp, sz = 0;
if (!hc) {
- printk(KERN_ERR PREFIX "host controller is not configured\n");
+ pr_err("host controller is not configured\n");
return ret;
}
@@ -254,7 +254,7 @@ static int acpi_smbus_hc_add(struct acpi_device *device)
status = acpi_evaluate_integer(device->handle, "_EC", NULL, &val);
if (ACPI_FAILURE(status)) {
- printk(KERN_ERR PREFIX "error obtaining _EC.\n");
+ pr_err("error obtaining _EC.\n");
return -EIO;
}