TTY: devpts, return created inode from devpts_pty_new
commit162b97cfa21f816f39ede1944f2a4220e3cf8969
authorJiri Slaby <jslaby@suse.cz>
Thu, 18 Oct 2012 20:26:28 +0000 (18 22:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Oct 2012 23:50:12 +0000 (22 16:50 -0700)
tree6cd663b2b17c3013285148efd43a145d6dea9a5e
parent8fcbaa2b7f5b70dba9ed1c7f91d0a270ce752e2c
TTY: devpts, return created inode from devpts_pty_new

The goal is to stop setting and using tty->driver_data in devpts code.
It should be used solely by the driver's code, pty in this case.

For the cleanup of layering, we will need the inode created in
devpts_pty_new to be stored into slave's driver_data. So we convert
devpts_pty_new to return the inode or an ERR_PTR-encoded error in case
of failure.

The move of 'inode = new_inode(sb);' from declarators to the code is
only cosmetical, but it makes the code easier to read.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/pty.c
fs/devpts/inode.c
include/linux/devpts_fs.h