From d9a6bc6ef013bb6bad03b760fb00219b72a5f8a7 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 9 Mar 2003 14:31:24 +0000 Subject: [SERIAL] Add per-port semaphore. Add a per-port semaphore to protect against simultaneous opens, closes, hangups, and the like. This removes the need for the UIF_CLOSING flag, as well as the extra tests and wait queues. Disable the old PM code for now - it is incompatible with the per-port semaphore. --- include/linux/serial_core.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 0ea3262a03b6..859550b04eaa 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -211,6 +211,8 @@ struct uart_state { struct uart_info *info; struct uart_port *port; + struct semaphore sem; + #ifdef CONFIG_PM struct pm_dev *pm; #endif @@ -235,7 +237,6 @@ struct uart_info { */ #define UIF_CHECK_CD (1 << 25) #define UIF_CTS_FLOW (1 << 26) -#define UIF_CLOSING (1 << 27) #define UIF_NORMAL_ACTIVE (1 << 29) #define UIF_INITIALIZED (1 << 31) -- cgit v1.2.3