linux/drivers/power
Lars-Peter Clausen 9777467257 power_supply: Initialize changed_work before calling device_add
Calling device_add causes an inital uevent for that device to be generated.
The power_supply uevent function calls the drivers get_property function,
which might causes the driver to update its state, which again might
causes the driver to call power_supply_changed(). Since the power_supplys
changed_work has not been initialized at this point the behavior is
undefined and can result in an OOPS.

This patch fixes the issue by initializing the power_supplys changed_work
prior to adding the power_supplys device to the device tree.

Reported-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
2011-02-22 11:01:42 +01:00
..
apm_power.c apm_power: Add missing break statement 2010-09-08 14:35:10 +04:00
bq20z75.c bq20z75: Add support for charge properties 2011-01-31 16:18:33 +03:00
bq27x00_battery.c bq27x00_battery: Add missing kfree(di->bus) in bq27x00_battery_remove() 2010-10-06 17:38:15 +04:00
collie_battery.c power_supply: Don't use flush_scheduled_work() 2010-12-22 02:39:56 +03:00
da9030_battery.c
ds2760_battery.c Merge git://git.infradead.org/battery-2.6 2011-01-14 09:25:59 -08:00
ds2782_battery.c ds2782_battery: Fix units 2010-10-06 17:36:49 +04:00
gpio-charger.c gpio-charger: Fix potential race between irq handler and probe/remove 2010-12-22 02:39:45 +03:00
intel_mid_battery.c Merge git://git.infradead.org/battery-2.6 2011-01-14 09:25:59 -08:00
isp1704_charger.c isp1704_charger: Detect charger after probe 2010-11-18 16:56:21 +03:00
jz4740-battery.c jz4740-battery: Should include linux/io.h 2010-12-22 02:52:25 +03:00
Kconfig power_supply: Add MAX17042 Fuel Gauge Driver 2011-01-14 18:11:59 +03:00
Makefile power_supply: Add MAX17042 Fuel Gauge Driver 2011-01-14 18:11:59 +03:00
max8925_power.c
max17040_battery.c i2c: Remove all i2c_set_clientdata(client, NULL) in drivers 2010-06-03 11:33:58 +02:00
max17042_battery.c power_supply: Add MAX17042 Fuel Gauge Driver 2011-01-14 18:11:59 +03:00
olpc_battery.c olpc_battery: Fix up XO-1.5 properties list 2011-01-13 01:41:57 +03:00
pcf50633-charger.c pcf50633-charger: Add missing sysfs_remove_group() 2010-09-22 16:14:49 +04:00
pda_power.c
pmu_battery.c
power_supply_core.c power_supply: Initialize changed_work before calling device_add 2011-02-22 11:01:42 +01:00
power_supply_leds.c power_supply: Add new LED trigger charging-blink-solid-full 2011-01-31 16:31:51 +03:00
power_supply_sysfs.c power_supply: Ignore -ENODATA errors when generating uevents 2011-02-22 06:47:52 +01:00
power_supply.h
s3c_adc_battery.c Merge git://git.infradead.org/battery-2.6 2011-01-14 09:25:59 -08:00
test_power.c
tosa_battery.c power_supply: Don't use flush_scheduled_work() 2010-12-22 02:39:56 +03:00
twl4030_charger.c power_supply: Add driver for TWL4030/TPS65950 BCI charger 2010-09-30 19:28:09 +04:00
wm97xx_battery.c power_supply: Don't use flush_scheduled_work() 2010-12-22 02:39:56 +03:00
wm831x_backup.c
wm831x_power.c wm831x_power: Add missing kfree(wm831x_power) in wm831x_power_remove() 2010-09-28 15:52:34 +04:00
wm8350_power.c
z2_battery.c power_supply: Don't use flush_scheduled_work() 2010-12-22 02:39:56 +03:00