diff options
author | Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> | 2018-07-24 13:27:33 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-07-25 13:41:52 +0200 |
commit | dd1fca9e6cd4c5c179f4e854ceddbc22890109ce (patch) | |
tree | e1feff2c693047184f7fdb75bd8dba1af32968e2 /drivers | |
parent | ACPI / battery: reorder headers alphabetically (diff) | |
download | linux-dd1fca9e6cd4c5c179f4e854ceddbc22890109ce.tar.xz linux-dd1fca9e6cd4c5c179f4e854ceddbc22890109ce.zip |
ACPI / battery: use specialized print macros
The kernel provides specialized macros for printing
info and warning messages which make the code shorter.
Use the specialized macros instead of bare printk()'s.
Also format one user visible string literal into a searchable one
line string.
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/battery.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 321b5f98b63c..6d302bb2f51b 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -577,8 +577,7 @@ static int acpi_battery_get_state(struct acpi_battery *battery) battery->rate_now != ACPI_BATTERY_VALUE_UNKNOWN && (s16)(battery->rate_now) < 0) { battery->rate_now = abs((s16)battery->rate_now); - printk_once(KERN_WARNING FW_BUG - "battery: (dis)charge rate invalid.\n"); + pr_warn_once(FW_BUG "battery: (dis)charge rate invalid.\n"); } if (test_bit(ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY, &battery->flags) @@ -1170,8 +1169,7 @@ static const struct file_operations acpi_battery_alarm_fops = { static int acpi_battery_add_fs(struct acpi_device *device) { - printk(KERN_WARNING PREFIX "Deprecated procfs I/F for battery is loaded," - " please retry with CONFIG_ACPI_PROCFS_POWER cleared\n"); + pr_warning(PREFIX "Deprecated procfs I/F for battery is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared\n"); if (!acpi_device_dir(device)) { acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), acpi_battery_dir); @@ -1398,7 +1396,7 @@ static int acpi_battery_add(struct acpi_device *device) } #endif - printk(KERN_INFO PREFIX "%s Slot [%s] (battery %s)\n", + pr_info(PREFIX "%s Slot [%s] (battery %s)\n", ACPI_BATTERY_DEVICE_NAME, acpi_device_bid(device), device->status.battery_present ? "present" : "absent"); |