But don't you really want to remove the children before you remove the
parent? If you do this patch, then the remove() function will have to
clean up the children first, right? Can we handle the core recursion
with the current locks properly?
Yes, for USB we still have a list of a device's children, as we need
them for various things, and the current driver model only has a parent
pointer, not a child pointer (which is good, as for USB we can have
multiple children). So in the function where we know a USB device is
disconnected, we walk our list of children and disconnect them in a
depth-first order. With this patch I don't see how it helps me push
code into the driver core.
Confused,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/