summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authorGuEe-GUI <[email protected]>2024-07-09 17:15:02 +0800
committerMeco Man <[email protected]>2024-09-03 19:49:47 -0400
commit2ec69c3ce43f123748c52140c40ad24e6d4b3b10 (patch)
tree015b339529ae70ea60bc7695879b0a79abe3e1c8 /components/drivers
parent7469edd1655f285d9c360fb4e2dfff8068c61390 (diff)
Fixup bus remove device option
The bus should call driver's `remove` callback not instead of `shutdown` in rt_bus_remove_device. Signed-off-by: GuEe-GUI <[email protected]>
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/core/bus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/drivers/core/bus.c b/components/drivers/core/bus.c
index 13e154f40c..a1d6d7e7b5 100644
--- a/components/drivers/core/bus.c
+++ b/components/drivers/core/bus.c
@@ -360,9 +360,9 @@ rt_err_t rt_bus_remove_device(rt_device_t dev)
}
else if (drv)
{
- if (drv->shutdown)
+ if (drv->remove)
{
- err = drv->shutdown(dev);
+ err = drv->remove(dev);
}
/* device and driver are in the same bus */