serial: kgdb_nmi: Use container_of() to locate private data
authorDaniel Thompson <daniel.thompson@linaro.org>
Thu, 29 May 2014 08:48:44 +0000 (09:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2014 18:28:05 +0000 (11:28 -0700)
commit06d18289256ec58b78ae8d5b83ff70c3c34309f5
treee6f11e28e4ace0453756822635a7460eb3f5046e
parent2fe686ebafb43414c406c4c6252ad388a871bf1a
serial: kgdb_nmi: Use container_of() to locate private data

This corrects a crash in kgdb_nmi_tty_shutdown() which occurs when
the function is called with port->tty set to NULL.

All conversions between struct tty_port and struct kgdb_nmi_tty_priv
have been switched to direct calls to container_of() to improve code
clarity and consistancy.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/kgdb_nmi.c