Skip to content

Commit 2ec69c3

Browse files
GuEe-GUImysterywolf
authored andcommitted
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]>
1 parent 7469edd commit 2ec69c3

File tree

1 file changed

+2
-2
lines changed
  • components/drivers/core

1 file changed

+2
-2
lines changed

components/drivers/core/bus.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,9 @@ rt_err_t rt_bus_remove_device(rt_device_t dev)
360360
}
361361
else if (drv)
362362
{
363-
if (drv->shutdown)
363+
if (drv->remove)
364364
{
365-
err = drv->shutdown(dev);
365+
err = drv->remove(dev);
366366
}
367367

368368
/* device and driver are in the same bus */

0 commit comments

Comments
 (0)