[PATCH v3 0/2] usb: musb: da8xx: pair OF child population
Pengpeng Hou <[email protected]>
| Newsgroups | org.kernel.vger.linux-usb,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
da8xx_probe() publishes CPPI child devices with of_platform_populate(). Those children are owned by the DA8xx parent and are not removed by unregistering the separately created MUSB platform device. The two patches intentionally cover separate lifetime exits. Patch 1 unwinds partially or fully populated children when probe later fails. Patch 2 pairs a successful population during normal driver removal. In both paths, resources are unpublished in the reverse order in which the driver made them visible. Changes since v2: https://lore.kernel.org/all/[email protected]/ - split probe-failure cleanup from normal remove cleanup - document ownership of OF-created children versus the MUSB device - cover partial failure from of_platform_populate() - preserve reverse publication order on every exit The series was reviewed statically against the current tree. I do not have DA8xx hardware for bind/unbind testing. Pengpeng Hou (2): usb: musb: da8xx: depopulate OF children on probe failure usb: musb: da8xx: depopulate OF children on remove drivers/usb/musb/da8xx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) base-commit: f5bbbfec59b4e2fb7520a91de3df8a6174325d6a -- 2.50.1 (Apple Git-155)