Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <guohanjun@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Hanjun Guo and committed by
Rafael J. Wysocki
f7e02c8d 8acf4108

+6 -6
+6 -6
drivers/acpi/sbs.c
··· 7 7 * Copyright (c) 2005 Rich Townsend <rhdt@bartol.udel.edu> 8 8 */ 9 9 10 + #define pr_fmt(fmt) "ACPI: " fmt 11 + 10 12 #include <linux/init.h> 11 13 #include <linux/slab.h> 12 14 #include <linux/module.h> ··· 24 22 #include <acpi/battery.h> 25 23 26 24 #include "sbshc.h" 27 - 28 - #define PREFIX "ACPI: " 29 25 30 26 #define ACPI_SBS_CLASS "sbs" 31 27 #define ACPI_AC_CLASS "ac_adapter" ··· 544 544 goto end; 545 545 battery->have_sysfs_alarm = 1; 546 546 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", 548 548 ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device), 549 549 battery->name, battery->present ? "present" : "absent"); 550 550 return result; ··· 577 577 result = PTR_ERR(sbs->charger); 578 578 sbs->charger = NULL; 579 579 } 580 - printk(KERN_INFO PREFIX "%s [%s]: AC Adapter [%s] (%s)\n", 580 + pr_info("%s [%s]: AC Adapter [%s] (%s)\n", 581 581 ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device), 582 582 ACPI_AC_DIR_NAME, sbs->charger_present ? "on-line" : "off-line"); 583 - end: 583 + end: 584 584 return result; 585 585 } 586 586 ··· 658 658 acpi_battery_add(sbs, 0); 659 659 660 660 acpi_smbus_register_callback(sbs->hc, acpi_sbs_callback, sbs); 661 - end: 661 + end: 662 662 if (result) 663 663 acpi_sbs_remove(device); 664 664 return result;