On Mon, May 13, 2013 at 05:01:30PM +0200, David Herrmann wrote: [..] > I really dislike the way power_supply core calls into the drivers during the > "add" uevent. If a driver holds an I/O mutex (or anything else), it might > even deadlock in a very non-obvious way. Is there a reason why we need to > pass _all_ battery properties along "add" and "remove" uevents? Isn't it > enough to pass them with "change" uevents? This would guarantee that the > power_supply callbacks are only called from user-context and "change" events. I don't think that there is a particular reason for that, but if you want to change that, then I'd suggest to still keep uevent reporting of all the properties on "add" and "remove" events, but don't actually call the drivers' callback, just assume ENODATA. This way we well preserve the behaviour of the older kernels, so that userland will not break if, for example, it allocates needed memory on "add" event, and then assumes that "change" will follow the pattern. Thanks, Anton -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html