]> git.dujemihanovic.xyz Git - u-boot.git/commit
efi_loader: disk: a helper function to delete efi_disk objects
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Tue, 19 Apr 2022 01:05:14 +0000 (10:05 +0900)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 23 Apr 2022 20:05:41 +0000 (22:05 +0200)
commitb406eb04c360b4842a02bcfedd9bbee015c3d127
tree9a2b9fb7689639f7f3158e9be8ad35b8e30eb41f
parent3c809dfed757c37b92ff543c8f1c941407bafc2e
efi_loader: disk: a helper function to delete efi_disk objects

This function is expected to be called, in particular from dm's pre_remove
hook, when associated block devices no longer exist.

Add efi_disk_remove() function.
This function removes an efi_disk object for a raw disk device (UCLASS_BLK)
and related objects for its partitions (UCLASS_PARTITION).

So this function is expected to be called through driver model's "remove"
interface every time a raw disk device is to be disconnected.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
lib/efi_loader/efi_disk.c