From: Pavel M. <pa...@uc...> - 2004-09-15 11:17:05
|
Hi! ACPI likes to abuse #define's quite a lot. This kills one of worst offenders. Please apply, Pavel --- clean-mm/drivers/acpi/battery.c 2004-08-24 09:03:30.000000000 +0200 +++ linux-mm/drivers/acpi/battery.c 2004-09-15 13:00:50.000000000 +0200 @@ -49,8 +49,6 @@ #define ACPI_BATTERY_FILE_ALARM "alarm" #define ACPI_BATTERY_NOTIFY_STATUS 0x80 #define ACPI_BATTERY_NOTIFY_INFO 0x81 -#define ACPI_BATTERY_UNITS_WATTS "mW" -#define ACPI_BATTERY_UNITS_AMPS "mA" #define _COMPONENT ACPI_BATTERY_COMPONENT @@ -378,7 +376,7 @@ goto end; } - units = bif->power_unit ? ACPI_BATTERY_UNITS_AMPS : ACPI_BATTERY_UNITS_WATTS; + units = bif->power_unit ? "mA" : "mW"; if (bif->design_capacity == ACPI_BATTERY_VALUE_UNKNOWN) p += sprintf(p, "design capacity: unknown\n"); @@ -471,7 +469,7 @@ /* Battery Units */ - units = battery->flags.power_unit ? ACPI_BATTERY_UNITS_AMPS : ACPI_BATTERY_UNITS_WATTS; + units = battery->flags.power_unit ? "mA" : "mW"; /* Battery Status (_BST) */ @@ -557,7 +555,7 @@ /* Battery Units */ - units = battery->flags.power_unit ? ACPI_BATTERY_UNITS_AMPS : ACPI_BATTERY_UNITS_WATTS; + units = battery->flags.power_unit ? "mA" : "mW"; /* Battery Alarm */ -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! |