On Mon, Nov 02, 2015 at 01:17:01PM +0000, Mark Brown wrote: > On Mon, Nov 02, 2015 at 02:14:56PM +0100, Johan Hovold wrote: > > On Mon, Nov 02, 2015 at 01:06:33PM +0000, Mark Brown wrote: > > > > > Dynamically allocated struct device are not the problem as then you're > > > > not *reusing* the same device structure. > > > > You may end up doing exactly that depending on what you get back from > > > the allocator of course. > > > But then the memory has already been released. You're not deregistering > > and reregistering the same device as in your example. > > Depends on your definition of "same" :) You might get the same address > back which has been known to confuse unhelpfully designed things. Yeah, I got your point, but again my claim was that device_unregister(dev); memset(dev); device_initialise(dev); ... device_add(dev); is not legal (and the current patch does not prevent this). Johan -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html