diff options
author | Alan Cox <alan@linux.intel.com> | 2009-09-19 13:13:32 -0700 |
---|---|---|
committer | Live-CD User <linux@linux.site> | 2009-09-19 13:13:32 -0700 |
commit | b58d13a0216d4e0753668214f23e1d2c24c30f8c (patch) | |
tree | e641971a9f1464b7f5a045d4df0e58874b6bf035 /drivers/serial | |
parent | bdc04e3174e18f475289fa8f4144f66686326b7e (diff) | |
download | blackbird-op-linux-b58d13a0216d4e0753668214f23e1d2c24c30f8c.tar.gz blackbird-op-linux-b58d13a0216d4e0753668214f23e1d2c24c30f8c.zip |
serial: move port users helper
This little helper is now tty_port specific and useful generally so move it
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/serial_core.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index e16d15343dfd..3c45a8d7eb7f 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -52,8 +52,6 @@ static struct lock_class_key port_lock_key; #define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8) -#define uart_users(state) ((state)->port.count + (state)->port.blocked_open) - #ifdef CONFIG_SERIAL_CORE_CONSOLE #define uart_console(port) ((port)->cons && (port)->cons->index == (port)->line) #else @@ -758,7 +756,7 @@ static int uart_set_info(struct uart_state *state, /* * Make sure that we are the sole user of this port. */ - if (uart_users(state) > 1) + if (tty_port_users(port) > 1) goto exit; /* @@ -974,7 +972,7 @@ static int uart_do_autoconfig(struct uart_state *state) return -ERESTARTSYS; ret = -EBUSY; - if (uart_users(state) == 1) { + if (tty_port_users(port) == 1) { uart_shutdown(state); /* |