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 <2991707448@qq.com>
This commit is contained in:
parent
7469edd165
commit
2ec69c3ce4
|
@ -360,9 +360,9 @@ rt_err_t rt_bus_remove_device(rt_device_t dev)
|
||||||
}
|
}
|
||||||
else if (drv)
|
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 */
|
/* device and driver are in the same bus */
|
||||||
|
|
Loading…
Reference in New Issue