usb: dwc3: omap: call of_platform_depopulate() instead
authorFelipe Balbi <balbi@ti.com>
Tue, 2 Sep 2014 19:12:26 +0000 (14:12 -0500)
committerFelipe Balbi <balbi@ti.com>
Mon, 9 Mar 2015 15:38:49 +0000 (10:38 -0500)
commit3d0184d087573b7606de45a8e4f01b6222caa47a
tree794159882387a2f9e209a0ec115b7540ed4ae1af
parent3da1f6ee3563f84395e5d334349a4c9e25d8cbcb
usb: dwc3: omap: call of_platform_depopulate() instead

This patch fixes a bug where removing dwc3-omap.ko
would not trigger removal of dwc3.ko.

of_platform_depopulate() already bakes an easy to
use API for removing all our children which were
populated during probe(); Let's use that one instead
of cooking our own solution.

Note that this is kind of a revert of commit c5a1fbc
(usb: dwc3: dwc3-omap: Fix the crash on module removal)
although we can't simply revert that because a direct
call to platform_device_unregister would also be flakey.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/dwc3-omap.c