On 10. 02. 25, 19:31, Stuart wrote:
Not that easy, as AFAIR power unregister cannot sleep.Sorry, I'm not sure I follow, why would power_supply_unregister sleep? I thought the issue was about locking mutexes in an interrupt context, why wouldn't using spinlock_irqsave work instead?
There sure, but you want to protect the ->battery, right? So you'd need to spin lock *also* power unregister.
Anyway, maybe I misunderstand, please send a patch and we will see ;). -- js suse labs