RE: [PATCH] Battery: sysfs_remove_battery(): possible circular locking
From: Lan, Tianyu <hidden>
Date: 2011-08-05 17:37:05
From: Lan, Tianyu <hidden>
Date: 2011-08-05 17:37:05
Well, how about using separate (independent lock) for sysfs_remove_battery() case? Since we can't safely drop battery->lock in sysfs_remove_battery() before power_supply_unregister() call. Not sure if it should be within struct acpi_battery, perhaps we could have it as a 'global' battery lock. Anyway, here it is:
I think it should be within struct acpi_battery. There maybe one or more batteries.