mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-28 03:47:11 +08:00
[smart] fixup rt_hw_serial_unregister_tty of serial tty
Mutex lock should be taken before release the TTY device. Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
parent
57d157b8ab
commit
732d32be09
@ -358,6 +358,8 @@ rt_err_t rt_hw_serial_unregister_tty(struct rt_serial_device *serial)
|
|||||||
softc = tty_softc(tp);
|
softc = tty_softc(tp);
|
||||||
serial->rx_notify = softc->backup_notify;
|
serial->rx_notify = softc->backup_notify;
|
||||||
|
|
||||||
|
tty_lock(tp);
|
||||||
|
|
||||||
tty_rel_gone(tp);
|
tty_rel_gone(tp);
|
||||||
|
|
||||||
/* device unregister? */
|
/* device unregister? */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user