diff options
author | Lan Tianyu <tianyu.lan@intel.com> | 2011-07-01 04:03:15 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-07-14 00:01:26 -0400 |
commit | 1dd5c715e5b7524da8c1030f5cf1ea903e45c457 (patch) | |
tree | 7c7bf76d2a406c114f9658e4b45f507dcd543517 /drivers/acpi/sbs.c | |
parent | b4a03b9aa96cc186bf3cfd7a55cb7d7227f0cf4d (diff) |
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/sbs.c')
-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 { | |||
130 | 130 | ||
131 | #define to_acpi_sbs(x) container_of(x, struct acpi_sbs, charger) | 131 | #define to_acpi_sbs(x) container_of(x, struct acpi_sbs, charger) |
132 | 132 | ||
133 | static int acpi_sbs_remove(struct acpi_device *device, int type); | ||
134 | static int acpi_battery_get_state(struct acpi_battery *battery); | ||
135 | |||
133 | static inline int battery_scale(int log) | 136 | static inline int battery_scale(int log) |
134 | { | 137 | { |
135 | int scale = 1; | 138 | int scale = 1; |
@@ -195,6 +198,8 @@ static int acpi_sbs_battery_get_property(struct power_supply *psy, | |||
195 | 198 | ||
196 | if ((!battery->present) && psp != POWER_SUPPLY_PROP_PRESENT) | 199 | if ((!battery->present) && psp != POWER_SUPPLY_PROP_PRESENT) |
197 | return -ENODEV; | 200 | return -ENODEV; |
201 | |||
202 | acpi_battery_get_state(battery); | ||
198 | switch (psp) { | 203 | switch (psp) { |
199 | case POWER_SUPPLY_PROP_STATUS: | 204 | case POWER_SUPPLY_PROP_STATUS: |
200 | if (battery->rate_now < 0) | 205 | if (battery->rate_now < 0) |
@@ -903,8 +908,6 @@ static void acpi_sbs_callback(void *context) | |||
903 | } | 908 | } |
904 | } | 909 | } |
905 | 910 | ||
906 | static int acpi_sbs_remove(struct acpi_device *device, int type); | ||
907 | |||
908 | static int acpi_sbs_add(struct acpi_device *device) | 911 | static int acpi_sbs_add(struct acpi_device *device) |
909 | { | 912 | { |
910 | struct acpi_sbs *sbs; | 913 | struct acpi_sbs *sbs; |