Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119729
b: refs/heads/master
c: f10a3a3
h: refs/heads/master
i:
  119727: f8796a1
v: v3
  • Loading branch information
Linus Torvalds committed Dec 5, 2008
1 parent 7edcd99 commit e382bac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bbeba4c35c252b2e961f09ce6ebe76b2cd5e7e3e
refs/heads/master: f10a3a32ae2edbe94920ce6827f4c2550eb6ed48
14 changes: 1 addition & 13 deletions trunk/drivers/acpi/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,19 +173,7 @@ static int acpi_battery_get_property(struct power_supply *psy,
val->intval = battery->voltage_now * 1000;
break;
case POWER_SUPPLY_PROP_CURRENT_NOW:
val->intval = battery->current_now;
if (battery->power_unit) {
val->intval *= 1000;
} else {
/*
* If power units are mW, convert to mA by dividing by
* current voltage.
*/
if (battery->voltage_now)
val->intval /= battery->voltage_now;
else
val->intval = -1;
}
val->intval = battery->current_now * 1000;
break;
case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN:
case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN:
Expand Down

0 comments on commit e382bac

Please sign in to comment.