TTY: extract driver lookup from tty_open
authorJiri Slaby <jslaby@suse.cz>
Wed, 9 Nov 2011 20:33:20 +0000 (21:33 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Nov 2011 23:52:45 +0000 (15:52 -0800)
commit5b5e70408f1e8a48deebedc26ba982bbc7db343e
tree67abea63ef57bac25f300eadd567b290bcae1794
parentb82154ac37a7d12335c7c3d3c34c549171ec0cb4
TTY: extract driver lookup from tty_open

The error handling in tty_open became unbearable. There were many
errors fixed recently. Extract the tty driver lookup from tty_open to
a separate function. This reduces the fail paths significantly and
makes tty_open more readable.

In the next patch we will move the fail path handling to the end of
the function.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/tty_io.c