diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-04-09 16:17:41 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-04-09 16:21:12 +0200 |
commit | 87d8a69709d971913e6cc7210450fcb8be963667 (patch) | |
tree | 4f8eb95c588f7df84554dcf97d67540664333a7b /drivers/char/n_tty.c | |
parent | intel-iommu: Fix section mismatch dmar_ir_support() uses dmar_tbl. (diff) | |
parent | Linux 2.6.34-rc3 (diff) | |
download | linux-87d8a69709d971913e6cc7210450fcb8be963667.tar.xz linux-87d8a69709d971913e6cc7210450fcb8be963667.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/char/n_tty.c')
-rw-r--r-- | drivers/char/n_tty.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index 2e50f4dfc79c..bdae8327143c 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c @@ -48,6 +48,7 @@ #include <linux/audit.h> #include <linux/file.h> #include <linux/uaccess.h> +#include <linux/module.h> #include <asm/system.h> @@ -2091,3 +2092,19 @@ struct tty_ldisc_ops tty_ldisc_N_TTY = { .receive_buf = n_tty_receive_buf, .write_wakeup = n_tty_write_wakeup }; + +/** + * n_tty_inherit_ops - inherit N_TTY methods + * @ops: struct tty_ldisc_ops where to save N_TTY methods + * + * Used by a generic struct tty_ldisc_ops to easily inherit N_TTY + * methods. + */ + +void n_tty_inherit_ops(struct tty_ldisc_ops *ops) +{ + *ops = tty_ldisc_N_TTY; + ops->owner = NULL; + ops->refcount = ops->flags = 0; +} +EXPORT_SYMBOL_GPL(n_tty_inherit_ops); |