diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-14 12:25:59 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-14 12:25:59 -0500 |
commit | 5957e33d6aec266659a71cfabcf7cf2c593ad0d2 (patch) | |
tree | 6397dec8d71e4ed4f5982792c57d7c0ddb525d1e /drivers/power/collie_battery.c | |
parent | 0ad53eeefcbb2620b6a71ffdaad4add20b450b8b (diff) | |
parent | 359ab9f5b154cbd807a11e22792235f0f36b0cd5 (diff) |
Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6: (21 commits)
power_supply: Add MAX17042 Fuel Gauge Driver
olpc_battery: Fix up XO-1.5 properties list
olpc_battery: Add support for CURRENT_NOW and VOLTAGE_NOW
olpc_battery: Add support for CHARGE_NOW
olpc_battery: Add support for CHARGE_FULL_DESIGN
olpc_battery: Ambient temperature is not available on XO-1.5
jz4740-battery: Should include linux/io.h
s3c_adc_battery: Add gpio_inverted field to pdata
power_supply: Don't use flush_scheduled_work()
power_supply: Fix use after free and memory leak
gpio-charger: Fix potential race between irq handler and probe/remove
gpio-charger: Provide default name for the power_supply
gpio-charger: Check result of kzalloc
jz4740-battery: Check if platform_data is supplied
isp1704_charger: Detect charger after probe
isp1704_charger: Set isp->dev before anything needs it
isp1704_charger: Detect HUB/Host chargers
isp1704_charger: Correct length for storing model
power_supply: Add gpio charger driver
jz4740-battery: Protect against concurrent battery readings
...
Diffstat (limited to 'drivers/power/collie_battery.c')
-rw-r--r-- | drivers/power/collie_battery.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/power/collie_battery.c b/drivers/power/collie_battery.c index 039f41ae217d..548d263b1ad0 100644 --- a/drivers/power/collie_battery.c +++ b/drivers/power/collie_battery.c | |||
@@ -295,7 +295,7 @@ static struct { | |||
295 | static int collie_bat_suspend(struct ucb1x00_dev *dev, pm_message_t state) | 295 | static int collie_bat_suspend(struct ucb1x00_dev *dev, pm_message_t state) |
296 | { | 296 | { |
297 | /* flush all pending status updates */ | 297 | /* flush all pending status updates */ |
298 | flush_scheduled_work(); | 298 | flush_work_sync(&bat_work); |
299 | return 0; | 299 | return 0; |
300 | } | 300 | } |
301 | 301 | ||
@@ -362,7 +362,7 @@ err_psy_reg_bu: | |||
362 | err_psy_reg_main: | 362 | err_psy_reg_main: |
363 | 363 | ||
364 | /* see comment in collie_bat_remove */ | 364 | /* see comment in collie_bat_remove */ |
365 | flush_scheduled_work(); | 365 | cancel_work_sync(&bat_work); |
366 | 366 | ||
367 | i--; | 367 | i--; |
368 | err_gpio: | 368 | err_gpio: |
@@ -382,12 +382,11 @@ static void __devexit collie_bat_remove(struct ucb1x00_dev *dev) | |||
382 | power_supply_unregister(&collie_bat_main.psy); | 382 | power_supply_unregister(&collie_bat_main.psy); |
383 | 383 | ||
384 | /* | 384 | /* |
385 | * now flush all pending work. | 385 | * Now cancel the bat_work. We won't get any more schedules, |
386 | * we won't get any more schedules, since all | 386 | * since all sources (isr and external_power_changed) are |
387 | * sources (isr and external_power_changed) | 387 | * unregistered now. |
388 | * are unregistered now. | ||
389 | */ | 388 | */ |
390 | flush_scheduled_work(); | 389 | cancel_work_sync(&bat_work); |
391 | 390 | ||
392 | for (i = ARRAY_SIZE(gpios) - 1; i >= 0; i--) | 391 | for (i = ARRAY_SIZE(gpios) - 1; i >= 0; i--) |
393 | gpio_free(gpios[i].gpio); | 392 | gpio_free(gpios[i].gpio); |