diff options
author | Lan Tianyu <tianyu.lan@intel.com> | 2011-07-01 12:03:15 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-07-14 08:01:26 +0400 |
commit | 1dd5c715e5b7524da8c1030f5cf1ea903e45c457 (patch) | |
tree | 7c7bf76d2a406c114f9658e4b45f507dcd543517 /drivers/acpi | |
parent | b4a03b9aa96cc186bf3cfd7a55cb7d7227f0cf4d (diff) | |
download | linux-1dd5c715e5b7524da8c1030f5cf1ea903e45c457.tar.xz |
ACPI / SBS: Add getting state operation in the acpi_sbs_battery_get_property()
https://bugzilla.kernel.org/show_bug.cgi?id=24492
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/sbs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 51ae3794ec7f..01dad1bedd17 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c @@ -130,6 +130,9 @@ struct acpi_sbs { #define to_acpi_sbs(x) container_of(x, struct acpi_sbs, charger) +static int acpi_sbs_remove(struct acpi_device *device, int type); +static int acpi_battery_get_state(struct acpi_battery *battery); + static inline int battery_scale(int log) { int scale = 1; @@ -195,6 +198,8 @@ static int acpi_sbs_battery_get_property(struct power_supply *psy, if ((!battery->present) && psp != POWER_SUPPLY_PROP_PRESENT) return -ENODEV; + + acpi_battery_get_state(battery); switch (psp) { case POWER_SUPPLY_PROP_STATUS: if (battery->rate_now < 0) @@ -903,8 +908,6 @@ static void acpi_sbs_callback(void *context) } } -static int acpi_sbs_remove(struct acpi_device *device, int type); - static int acpi_sbs_add(struct acpi_device *device) { struct acpi_sbs *sbs; |