mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
dm: core: Remove unbind operations when not required
The CONFIG_DM_DEVICE_REMOVE option takes out code related to removing devices. It should also remove the 'unbind' code since if we cannot remove we probably don't need to unbind. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
36fa61dc61
commit
7f9875e733
2 changed files with 12 additions and 0 deletions
|
@ -386,6 +386,7 @@ err:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DM_DEVICE_REMOVE
|
||||
int uclass_unbind_device(struct udevice *dev)
|
||||
{
|
||||
struct uclass *uc;
|
||||
|
@ -401,6 +402,7 @@ int uclass_unbind_device(struct udevice *dev)
|
|||
list_del(&dev->uclass_node);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int uclass_resolve_seq(struct udevice *dev)
|
||||
{
|
||||
|
@ -464,6 +466,7 @@ int uclass_post_probe_device(struct udevice *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DM_DEVICE_REMOVE
|
||||
int uclass_pre_remove_device(struct udevice *dev)
|
||||
{
|
||||
struct uclass_driver *uc_drv;
|
||||
|
@ -485,3 +488,4 @@ int uclass_pre_remove_device(struct udevice *dev)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue