提交 651a8048 编写于 作者: J Johan Hovold 提交者: Zheng Zengkai

tty: actually undefine superseded ASYNC flags

stable inclusion
from stable-5.10.37
commit bd8fa4ef36cafa76f992ee138c7d9e67f14a2ca1
bugzilla: 51868
CVE: NA

--------------------------------

[ Upstream commit d09845e9 ]

Some kernel-internal ASYNC flags have been superseded by tty-port flags
and should no longer be used by kernel drivers.

Fix the misspelled "__KERNEL__" compile guards which failed their sole
purpose to break out-of-tree drivers that have not yet been updated.

Fixes: 5c0517fe ("tty: core: Undefine ASYNC_* flags superceded by TTY_PORT* flags")
Signed-off-by: NJohan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210407095208.31838-2-johan@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 c3154574
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
* WARNING: These flags are no longer used and have been superceded by the * WARNING: These flags are no longer used and have been superceded by the
* TTY_PORT_ flags in the iflags field (and not userspace-visible) * TTY_PORT_ flags in the iflags field (and not userspace-visible)
*/ */
#ifndef _KERNEL_ #ifndef __KERNEL__
#define ASYNCB_INITIALIZED 31 /* Serial port was initialized */ #define ASYNCB_INITIALIZED 31 /* Serial port was initialized */
#define ASYNCB_SUSPENDED 30 /* Serial port is suspended */ #define ASYNCB_SUSPENDED 30 /* Serial port is suspended */
#define ASYNCB_NORMAL_ACTIVE 29 /* Normal device is active */ #define ASYNCB_NORMAL_ACTIVE 29 /* Normal device is active */
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
#define ASYNC_SPD_WARP (ASYNC_SPD_HI|ASYNC_SPD_SHI) #define ASYNC_SPD_WARP (ASYNC_SPD_HI|ASYNC_SPD_SHI)
#define ASYNC_SPD_MASK (ASYNC_SPD_HI|ASYNC_SPD_VHI|ASYNC_SPD_SHI) #define ASYNC_SPD_MASK (ASYNC_SPD_HI|ASYNC_SPD_VHI|ASYNC_SPD_SHI)
#ifndef _KERNEL_ #ifndef __KERNEL__
/* These flags are no longer used (and were always masked from userspace) */ /* These flags are no longer used (and were always masked from userspace) */
#define ASYNC_INITIALIZED (1U << ASYNCB_INITIALIZED) #define ASYNC_INITIALIZED (1U << ASYNCB_INITIALIZED)
#define ASYNC_NORMAL_ACTIVE (1U << ASYNCB_NORMAL_ACTIVE) #define ASYNC_NORMAL_ACTIVE (1U << ASYNCB_NORMAL_ACTIVE)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册