Skip to content
Snippets Groups Projects
Commit e98856fc authored by Stefan Roese's avatar Stefan Roese Committed by Bin Meng
Browse files

serial: serial-uclass: Use force parameter in stdio_deregister_dev()


On my x86 platform I've noticed, that calling dm_uninit() or the new
function dm_remove_devices_flags() does not remove the desired device at
all. Debugging showed, that the serial uclass returns -EPERM in
serial_pre_remove(). This patch sets the force parameter when calling
stdio_deregister_dev() resulting in a removal of the device.

Signed-off-by: default avatarStefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent ddb3ac3c
No related branches found
No related tags found
No related merge requests found
...@@ -349,7 +349,7 @@ static int serial_pre_remove(struct udevice *dev) ...@@ -349,7 +349,7 @@ static int serial_pre_remove(struct udevice *dev)
#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER) #if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER)
struct serial_dev_priv *upriv = dev_get_uclass_priv(dev); struct serial_dev_priv *upriv = dev_get_uclass_priv(dev);
if (stdio_deregister_dev(upriv->sdev, 0)) if (stdio_deregister_dev(upriv->sdev, true))
return -EPERM; return -EPERM;
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment