Skip to content

Commit f7e02c8

Browse files
guohanjunrafaeljw
authored andcommitted
ACPI: sbs: Unify the message printing
Using pr_fmt() and pr_*() macros to unify the message printing. While at it, fix the obvious coding style issue when scanning the code. Signed-off-by: Hanjun Guo <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 8acf410 commit f7e02c8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/acpi/sbs.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* Copyright (c) 2005 Rich Townsend <[email protected]>
88
*/
99

10+
#define pr_fmt(fmt) "ACPI: " fmt
11+
1012
#include <linux/init.h>
1113
#include <linux/slab.h>
1214
#include <linux/module.h>
@@ -23,8 +25,6 @@
2325

2426
#include "sbshc.h"
2527

26-
#define PREFIX "ACPI: "
27-
2828
#define ACPI_SBS_CLASS "sbs"
2929
#define ACPI_AC_CLASS "ac_adapter"
3030
#define ACPI_SBS_DEVICE_NAME "Smart Battery System"
@@ -544,7 +544,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
544544
goto end;
545545
battery->have_sysfs_alarm = 1;
546546
end:
547-
printk(KERN_INFO PREFIX "%s [%s]: Battery Slot [%s] (battery %s)\n",
547+
pr_info("%s [%s]: Battery Slot [%s] (battery %s)\n",
548548
ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device),
549549
battery->name, battery->present ? "present" : "absent");
550550
return result;
@@ -577,10 +577,10 @@ static int acpi_charger_add(struct acpi_sbs *sbs)
577577
result = PTR_ERR(sbs->charger);
578578
sbs->charger = NULL;
579579
}
580-
printk(KERN_INFO PREFIX "%s [%s]: AC Adapter [%s] (%s)\n",
580+
pr_info("%s [%s]: AC Adapter [%s] (%s)\n",
581581
ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device),
582582
ACPI_AC_DIR_NAME, sbs->charger_present ? "on-line" : "off-line");
583-
end:
583+
end:
584584
return result;
585585
}
586586

@@ -658,7 +658,7 @@ static int acpi_sbs_add(struct acpi_device *device)
658658
acpi_battery_add(sbs, 0);
659659

660660
acpi_smbus_register_callback(sbs->hc, acpi_sbs_callback, sbs);
661-
end:
661+
end:
662662
if (result)
663663
acpi_sbs_remove(device);
664664
return result;

0 commit comments

Comments
 (0)