linux/drivers/power
Rajanikanth H.V eeb0751c99 ab8500_btemp: Demote initcall sequence
Power supply subsystem creates thermal zone device for the property
'POWER_SUPPLY_PROP_TEMP' which requires thermal subsystem to be ready
before 'ab8500 battery temperature monitor' driver is initialized. ab8500
btemp driver is initialized with subsys_initcall whereas thermal subsystem
is initialized with fs_initcall which causes
thermal_zone_device_register(...) to crash since the required structure
'thermal_class' is not initialized yet:

Unable to handle kernel NULL pointer dereference at virtual address 000000a4
pgd = c0004000
[000000a4] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0    Tainted: G        W     (3.8.0-rc4-00001-g632fda8-dirty #1)
PC is at _raw_spin_lock+0x18/0x54
LR is at get_device_parent+0x50/0x1b8
pc : [<c02f1dd0>]    lr : [<c01cb248>]    psr: 60000013
sp : ef04bdc8  ip : 00000000  fp : c0446180
r10: ef216e38  r9 : c03af5d0  r8 : ef275c18
r7 : 00000000  r6 : c0476c14  r5 : ef275c18  r4 : ef095840
r3 : ef04a000  r2 : 00000001  r1 : 00000000  r0 : 000000a4
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5787d  Table: 0000404a  DAC: 00000015
Process swapper/0 (pid: 1, stack limit = 0xef04a238)
Stack: (0xef04bdc8 to 0xef04c000)
[...]
[<c02f1dd0>] (_raw_spin_lock+0x18/0x54) from [<c01cb248>] (get_device_parent+0x50/0x1b8)
[<c01cb248>] (get_device_parent+0x50/0x1b8) from [<c01cb8d8>] (device_add+0xa4/0x574)
[<c01cb8d8>] (device_add+0xa4/0x574) from [<c020b91c>] (thermal_zone_device_register+0x118/0x938)
[<c020b91c>] (thermal_zone_device_register+0x118/0x938) from [<c0202030>] (power_supply_register+0x170/0x1f8)
[<c0202030>] (power_supply_register+0x170/0x1f8) from [<c02055ec>] (ab8500_btemp_probe+0x208/0x47c)
[<c02055ec>] (ab8500_btemp_probe+0x208/0x47c) from [<c01cf0dc>] (platform_drv_probe+0x14/0x18)
[<c01cf0dc>] (platform_drv_probe+0x14/0x18) from [<c01cde70>] (driver_probe_device+0x74/0x20c)
[<c01cde70>] (driver_probe_device+0x74/0x20c) from [<c01ce094>] (__driver_attach+0x8c/0x90)
[<c01ce094>] (__driver_attach+0x8c/0x90) from [<c01cc640>] (bus_for_each_dev+0x4c/0x80)
[<c01cc640>] (bus_for_each_dev+0x4c/0x80) from [<c01cd6b4>] (bus_add_driver+0x16c/0x23c)
[<c01cd6b4>] (bus_add_driver+0x16c/0x23c) from [<c01ce54c>] (driver_register+0x78/0x14c)
[<c01ce54c>] (driver_register+0x78/0x14c) from [<c00086ac>] (do_one_initcall+0xfc/0x164)
[<c00086ac>] (do_one_initcall+0xfc/0x164) from [<c02e89c8>] (kernel_init+0x120/0x2b8)
[<c02e89c8>] (kernel_init+0x120/0x2b8) from [<c000e358>] (ret_from_fork+0x14/0x3c)
Code: e3c3303f e5932004 e2822001 e5832004 (e1903f9f)
---[ end trace ed9df72941b5bada ]---

Signed-off-by: Rajanikanth H.V <rajanikanth.hv@stericsson.com>
Cc: stable@vger.kernel.org
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-02-02 19:19:36 -08:00
..
avs ARM: OMAP2+: Drop plat/cpu.h for omap2plus 2012-12-17 10:50:41 -08:00
reset qnap-poweroff: Fix license string 2013-01-19 18:04:04 -08:00
88pm860x_battery.c 88pm860x_battery: Eliminate possible references to released resources 2013-01-06 12:46:23 -08:00
88pm860x_charger.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
ab8500_bmdata.c ab8500_bm: Recharge condition not optimal for battery 2013-01-15 17:43:46 -08:00
ab8500_btemp.c ab8500_btemp: Demote initcall sequence 2013-02-02 19:19:36 -08:00
ab8500_charger.c ab8500_charger: Adds support for legacy USB chargers 2013-01-15 17:44:42 -08:00
ab8500_fg.c ab8500_fg: Remove pointless round_jiffies() call 2013-01-15 17:44:46 -08:00
abx500_chargalg.c ab8500_bm: Recharge condition not optimal for battery 2013-01-15 17:43:46 -08:00
apm_power.c
bq27x00_battery.c bq27x00_battery: Fix bugs introduced with BQ27425 support 2013-01-05 18:53:28 -08:00
bq2415x_charger.c bq2415x_charger: Use devm_kzalloc() 2013-01-05 18:41:12 -08:00
charger-manager.c charger_manager: Don't use [delayed_]work_pending() 2013-01-05 14:03:26 -08:00
collie_battery.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
da9030_battery.c da9030_battery: Don't use 0 as NULL 2012-08-22 20:00:45 -07:00
da9052-battery.c da9052-battery: Avoid out-of-range array access 2013-01-06 14:34:26 -08:00
ds2760_battery.c workqueue: use mod_delayed_work() instead of cancel + queue 2012-08-13 16:27:37 -07:00
ds2780_battery.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
ds2781_battery.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
ds2782_battery.c ds2782_battery: Add power_supply_changed() calls for proper uevent support 2013-02-02 19:07:34 -08:00
generic-adc-battery.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux 2012-12-11 22:15:57 -08:00
goldfish_battery.c power: Add battery driver for goldfish emulator 2013-02-02 19:06:34 -08:00
gpio-charger.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
intel_mid_battery.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
isp1704_charger.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
jz4740-battery.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux 2012-12-11 22:15:57 -08:00
Kconfig power: Add battery driver for goldfish emulator 2013-02-02 19:06:34 -08:00
lp8727_charger.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
lp8788-charger.c lp8788-charger: Fix a parent device in kernel messages 2013-01-06 14:18:43 -08:00
Makefile power: Add battery driver for goldfish emulator 2013-02-02 19:06:34 -08:00
max8903_charger.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
max8925_power.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux 2012-12-11 22:15:57 -08:00
max8997_charger.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
max8998_charger.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
max17040_battery.c max17040_battery: Use devm_kzalloc 2013-01-06 14:18:58 -08:00
max17042_battery.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux 2012-12-11 22:15:57 -08:00
olpc_battery.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
pcf50633-charger.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
pda_power.c pda_power: Remove ac_draw_failed goto and label 2012-09-21 16:50:11 -07:00
pmu_battery.c
power_supply_core.c Highlights: 2012-12-13 19:26:04 -08:00
power_supply_leds.c
power_supply_sysfs.c power_supply: Add watchdog and safety timer expiries under PROP_HEALTH_* 2013-01-05 18:51:18 -08:00
power_supply.h
rx51_battery.c power_supply: Add new Nokia RX-51 (N900) power supply battery driver 2012-11-18 15:11:33 -08:00
s3c_adc_battery.c power: remove use of __devinit 2012-11-28 11:43:22 -08:00
sbs-battery.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
smb347-charger.c power: remove use of __devexit_p 2012-11-28 11:43:22 -08:00
test_power.c
tosa_battery.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
twl4030_charger.c twl4030_charger: Change TWL4030_MODULE_* ids to TWL_MODULE_* 2012-11-18 16:14:52 -08:00
wm97xx_battery.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
wm831x_backup.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
wm831x_power.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
wm8350_power.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00
z2_battery.c power: remove use of __devexit 2012-11-28 11:43:22 -08:00