[PATCH v2 11/41] dm: core: Fix handling of uclass pre_unbind method

Simon Glass sjg at chromium.org
Wed Nov 24 23:22:28 CET 2021


This method is currently called after the platform data has been freed.
But the pre_unbind() method may wish to access this, e.g. to free some
data structures stored there.

Split the unbinding of devices into two pieces, as is done with removal.
This corrects the problem.

Also tidy a code-style issue in device_remove() while we are here.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 drivers/core/device-remove.c |  9 +++++----
 drivers/core/uclass.c        |  8 +++++++-
 include/dm/uclass-internal.h | 14 +++++++++++++-
 3 files changed, 25 insertions(+), 6 deletions(-)

Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list