serial: core: Document and assert lock requirements for irq helpers
authorPeter Hurley <peter@hurleysoftware.com>
Wed, 10 Sep 2014 19:06:23 +0000 (15:06 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Sep 2014 04:19:34 +0000 (21:19 -0700)
commit4d90bb147ef6b91f529a21b498ff2b5fdc6785b4
treeb6ae1e41260d1591aeabc56bb54969ffb4061729
parent9a37110d20c95d1ebf6c04881177fe8f62831db2
serial: core: Document and assert lock requirements for irq helpers

The serial core provides two helper functions, uart_handle_dcd_change()
and uart_handle_cts_change(), for UART drivers to use at interrupt
time. The serial core expects the UART driver to hold the uart port lock
when calling these helpers to prevent state corruption.

If lockdep enabled, trigger a warning if the uart port lock is not held
when calling these helper functions.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_core.c