Commit 0f4c6547 authored by Nicholas Mazzuca's avatar Nicholas Mazzuca Committed by Rafael J. Wysocki

ACPI / battery: Make sure all spaces are in correct places

Add or remove spaces that give errors or warnings from checkpatch.pl.
Signed-off-by: default avatarNicholas Mazzuca <nicholas@mazzucastuff.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent c7d9ca90
...@@ -425,7 +425,7 @@ static int acpi_battery_get_info(struct acpi_battery *battery) ...@@ -425,7 +425,7 @@ static int acpi_battery_get_info(struct acpi_battery *battery)
{ {
int result = -EFAULT; int result = -EFAULT;
acpi_status status = 0; acpi_status status = 0;
char *name = test_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags)? char *name = test_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags) ?
"_BIX" : "_BIF"; "_BIX" : "_BIF";
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
...@@ -661,11 +661,11 @@ static void find_battery(const struct dmi_header *dm, void *private) ...@@ -661,11 +661,11 @@ static void find_battery(const struct dmi_header *dm, void *private)
static void acpi_battery_quirks(struct acpi_battery *battery) static void acpi_battery_quirks(struct acpi_battery *battery)
{ {
if (test_bit(ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY, &battery->flags)) if (test_bit(ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY, &battery->flags))
return ; return;
if (battery->full_charge_capacity == 100 && if (battery->full_charge_capacity == 100 &&
battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN && battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN &&
battery->capacity_now >=0 && battery->capacity_now <= 100) { battery->capacity_now >= 0 && battery->capacity_now <= 100) {
set_bit(ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY, &battery->flags); set_bit(ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY, &battery->flags);
battery->full_charge_capacity = battery->design_capacity; battery->full_charge_capacity = battery->design_capacity;
battery->capacity_now = (battery->capacity_now * battery->capacity_now = (battery->capacity_now *
...@@ -673,7 +673,7 @@ static void acpi_battery_quirks(struct acpi_battery *battery) ...@@ -673,7 +673,7 @@ static void acpi_battery_quirks(struct acpi_battery *battery)
} }
if (test_bit(ACPI_BATTERY_QUIRK_THINKPAD_MAH, &battery->flags)) if (test_bit(ACPI_BATTERY_QUIRK_THINKPAD_MAH, &battery->flags))
return ; return;
if (battery->power_unit && dmi_name_in_vendors("LENOVO")) { if (battery->power_unit && dmi_name_in_vendors("LENOVO")) {
const char *s; const char *s;
...@@ -761,7 +761,7 @@ static int acpi_battery_print_info(struct seq_file *seq, int result) ...@@ -761,7 +761,7 @@ static int acpi_battery_print_info(struct seq_file *seq, int result)
goto end; goto end;
seq_printf(seq, "present: %s\n", seq_printf(seq, "present: %s\n",
acpi_battery_present(battery)?"yes":"no"); acpi_battery_present(battery) ? "yes" : "no");
if (!acpi_battery_present(battery)) if (!acpi_battery_present(battery))
goto end; goto end;
if (battery->design_capacity == ACPI_BATTERY_VALUE_UNKNOWN) if (battery->design_capacity == ACPI_BATTERY_VALUE_UNKNOWN)
...@@ -817,12 +817,12 @@ static int acpi_battery_print_state(struct seq_file *seq, int result) ...@@ -817,12 +817,12 @@ static int acpi_battery_print_state(struct seq_file *seq, int result)
goto end; goto end;
seq_printf(seq, "present: %s\n", seq_printf(seq, "present: %s\n",
acpi_battery_present(battery)?"yes":"no"); acpi_battery_present(battery) ? "yes" : "no");
if (!acpi_battery_present(battery)) if (!acpi_battery_present(battery))
goto end; goto end;
seq_printf(seq, "capacity state: %s\n", seq_printf(seq, "capacity state: %s\n",
(battery->state & 0x04)?"critical":"ok"); (battery->state & 0x04) ? "critical" : "ok");
if ((battery->state & 0x01) && (battery->state & 0x02)) if ((battery->state & 0x01) && (battery->state & 0x02))
seq_printf(seq, seq_printf(seq,
"charging state: charging/discharging\n"); "charging state: charging/discharging\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment