hsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget,/translations/zh_CN/driver-api/tty/tty_ldiscmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/zh_TW/driver-api/tty/tty_ldiscmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/it_IT/driver-api/tty/tty_ldiscmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ja_JP/driver-api/tty/tty_ldiscmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ko_KR/driver-api/tty/tty_ldiscmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/pt_BR/driver-api/tty/tty_ldiscmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/sp_SP/driver-api/tty/tty_ldiscmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhF/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc.rsthKubhsection)}(hhh](htitle)}(hTTY Line Disciplineh]hTTY Line Discipline}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhtopic)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh]h paragraph)}(hhh]h reference)}(hhh]h Registration}(hhhhhNhNubah}(h]id1ah ]h"]h$]h&]refid registrationuh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]hOther Functions}(hjhhhNhNubah}(h]id2ah ]h"]h$]h&]refidother-functionsuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]h$Line Discipline Operations Reference}(hj7hhhNhNubah}(h]id3ah ]h"]h$]h&]refid$line-discipline-operations-referenceuh1hhj4ubah}(h]h ]h"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]h Driver Access}(hjYhhhNhNubah}(h]id4ah ]h"]h$]h&]refid driver-accessuh1hhjVubah}(h]h ]h"]h$]h&]uh1hhjSubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]h TTY Flags}(hj{hhhNhNubah}(h]id5ah ]h"]h$]h&]refid tty-flagsuh1hhjxubah}(h]h ]h"]h$]h&]uh1hhjuubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]hLocking}(hjhhhNhNubah}(h]id6ah ]h"]h$]h&]refidlockinguh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]hInternal Functions}(hjhhhNhNubah}(h]id7ah ]h"]h$]h&]refidinternal-functionsuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhNhNubah}(h]contentsah ](contentslocaleh"]contentsah$]h&]uh1hhhhKhhhhubh)}(hXQTTY line discipline process all incoming and outgoing character from/to a tty device. The default line discipline is :doc:`N_TTY `. It is also a fallback if establishing any other discipline for a tty fails. If even N_TTY fails, N_NULL takes over. That never fails, but also does not process any characters -- it throws them away.h](huTTY line discipline process all incoming and outgoing character from/to a tty device. The default line discipline is }(hjhhhNhNubh)}(h:doc:`N_TTY `h]hinline)}(hjh]hN_TTY}(hjhhhNhNubah}(h]h ](xrefstdstd-doceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocdriver-api/tty/tty_ldisc refdomainjreftypedoc refexplicitrefwarn reftargetn_ttyuh1hhhhK hjubh. It is also a fallback if establishing any other discipline for a tty fails. If even N_TTY fails, N_NULL takes over. That never fails, but also does not process any characters -- it throws them away.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hhh](h)}(h Registrationh]h Registration}(hj%hhhNhNubah}(h]h ]h"]h$]h&]refidhuh1hhj"hhhhhKubh)}(hXhLine disciplines are registered with tty_register_ldisc() passing the ldisc structure. At the point of registration the discipline must be ready to use and it is possible it will get used before the call returns success. If the call returns an error then it won’t get called. Do not reuse ldisc numbers as they are part of the userspace ABI and writing over an existing ldisc will cause demons to eat your computer. You must not re-register over the top of the line discipline even with the same data or your computer again will be eaten by demons. In order to remove a line discipline call tty_unregister_ldisc().h]hXhLine disciplines are registered with tty_register_ldisc() passing the ldisc structure. At the point of registration the discipline must be ready to use and it is possible it will get used before the call returns success. If the call returns an error then it won’t get called. Do not reuse ldisc numbers as they are part of the userspace ABI and writing over an existing ldisc will cause demons to eat your computer. You must not re-register over the top of the line discipline even with the same data or your computer again will be eaten by demons. In order to remove a line discipline call tty_unregister_ldisc().}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj"hhubh)}(hXHeed this warning: the reference count field of the registered copies of the tty_ldisc structure in the ldisc table counts the number of lines using this discipline. The reference count of the tty_ldisc structure within a tty counts the number of active users of the ldisc at this instant. In effect it counts the number of threads of execution within an ldisc method (plus those about to enter and exit although this detail matters not).h]hXHeed this warning: the reference count field of the registered copies of the tty_ldisc structure in the ldisc table counts the number of lines using this discipline. The reference count of the tty_ldisc structure within a tty counts the number of active users of the ldisc at this instant. In effect it counts the number of threads of execution within an ldisc method (plus those about to enter and exit although this detail matters not).}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj"hhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singletty_register_ldisc (C function)c.tty_register_ldischNtauh1jPhj"hhhNhNubhdesc)}(hhh](hdesc_signature)}(h>int tty_register_ldisc (const struct tty_ldisc_ops *new_ldisc)h]hdesc_signature_line)}(h=int tty_register_ldisc(const struct tty_ldisc_ops *new_ldisc)h](hdesc_sig_keyword_type)}(hinth]hint}(hjthhhNhNubah}(h]h ]ktah"]h$]h&]uh1jrhjnhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chK2ubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjnhhhjhK2ubh desc_name)}(htty_register_ldisch]h desc_sig_name)}(htty_register_ldisch]htty_register_ldisc}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjnhhhjhK2ubhdesc_parameterlist)}(h'(const struct tty_ldisc_ops *new_ldisc)h]hdesc_parameter)}(h%const struct tty_ldisc_ops *new_ldisch](hdesc_sig_keyword)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h tty_ldisc_opsh]h tty_ldisc_ops}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jjsbc.tty_register_ldiscasbuh1hhjubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubhdesc_sig_punctuation)}(h*h]h*}(hj7hhhNhNubah}(h]h ]pah"]h$]h&]uh1j5hjubj)}(h new_ldisch]h new_ldisc}(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjnhhhjhK2ubeh}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1jlsphinx_line_type declaratorhjhhhhjhK2ubah}(h]j_ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jfhjhK2hjchhubh desc_content)}(hhh]h)}(hinstall a line disciplineh]hinstall a line discipline}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chK2hjwhhubah}(h]h ]h"]h$]h&]uh1juhjchhhjhK2ubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jahhhj"hNhNubh container)}(hXB**Parameters** ``const struct tty_ldisc_ops *new_ldisc`` pointer to the ldisc object **Description** Installs a new line discipline into the kernel. The discipline is set up as unreferenced and then made available to the kernel from this point onwards. Locking: takes ``tty_ldiscs_lock`` to guard against ldisc racesh](h)}(h**Parameters**h]hstrong)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chK6hjubhdefinition_list)}(hhh]hdefinition_list_item)}(hF``const struct tty_ldisc_ops *new_ldisc`` pointer to the ldisc object h](hterm)}(h)``const struct tty_ldisc_ops *new_ldisc``h]hliteral)}(hjh]h%const struct tty_ldisc_ops *new_ldisc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chK3hjubh definition)}(hhh]h)}(hpointer to the ldisc objecth]hpointer to the ldisc object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK3hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK3hjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chK5hjubh)}(hInstalls a new line discipline into the kernel. The discipline is set up as unreferenced and then made available to the kernel from this point onwards.h]hInstalls a new line discipline into the kernel. The discipline is set up as unreferenced and then made available to the kernel from this point onwards.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chK4hjubh)}(h?Locking: takes ``tty_ldiscs_lock`` to guard against ldisc racesh](hLocking: takes }(hj/hhhNhNubj)}(h``tty_ldiscs_lock``h]htty_ldiscs_lock}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh to guard against ldisc races}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chK7hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj"hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]!tty_unregister_ldisc (C function)c.tty_unregister_ldischNtauh1jPhj"hhhNhNubjb)}(hhh](jg)}(h=void tty_unregister_ldisc (const struct tty_ldisc_ops *ldisc)h]jm)}(hhj> ubh literal_block)}(hXstruct tty_ldisc_ops { char *name; int num; int (*open)(struct tty_struct *tty); void (*close)(struct tty_struct *tty); void (*flush_buffer)(struct tty_struct *tty); ssize_t (*read)(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr, void **cookie, unsigned long offset); ssize_t (*write)(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr); int (*ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); int (*compat_ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); void (*set_termios)(struct tty_struct *tty, const struct ktermios *old); __poll_t (*poll)(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait); void (*hangup)(struct tty_struct *tty); void (*receive_buf)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); void (*write_wakeup)(struct tty_struct *tty); void (*dcd_change)(struct tty_struct *tty, bool active); size_t (*receive_buf2)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); void (*lookahead_buf)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); struct module *owner; };h]hXstruct tty_ldisc_ops { char *name; int num; int (*open)(struct tty_struct *tty); void (*close)(struct tty_struct *tty); void (*flush_buffer)(struct tty_struct *tty); ssize_t (*read)(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr, void **cookie, unsigned long offset); ssize_t (*write)(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr); int (*ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); int (*compat_ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); void (*set_termios)(struct tty_struct *tty, const struct ktermios *old); __poll_t (*poll)(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait); void (*hangup)(struct tty_struct *tty); void (*receive_buf)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); void (*write_wakeup)(struct tty_struct *tty); void (*dcd_change)(struct tty_struct *tty, bool active); size_t (*receive_buf2)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); void (*lookahead_buf)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); struct module *owner; };}hja sbah}(h]h ]h"]h$]h&]hhuh1j_ hb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK@hj> ubh)}(h **Members**h]j)}(hjr h]hMembers}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKUhj> ubj)}(hhh](j)}(h9``name`` name of this ldisc rendered in /proc/tty/ldiscs h](j)}(h``name``h]j)}(hj h]hname}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK=hj ubj)}(hhh]h)}(h/name of this ldisc rendered in /proc/tty/ldiscsh]h/name of this ldisc rendered in /proc/tty/ldiscs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK=hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hK=hj ubj)}(hK``num`` ``N_*`` number (``N_TTY``, ``N_HDLC``, ...) reserved to this ldisc h](j)}(h``num``h]j)}(hj h]hnum}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK>hj ubj)}(hhh]h)}(hB``N_*`` number (``N_TTY``, ``N_HDLC``, ...) reserved to this ldisch](j)}(h``N_*``h]hN_*}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh number (}(hj hhhNhNubj)}(h ``N_TTY``h]hN_TTY}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, }(hj hhhNhNubj)}(h ``N_HDLC``h]hN_HDLC}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, ...) reserved to this ldisc}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hK>hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hK>hj ubj)}(h2``open`` [TTY] ``int ()(struct tty_struct *tty)`` h](j)}(h``open``h]j)}(hj5 h]hopen}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3 ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK@hj/ ubj)}(hhh]h)}(h([TTY] ``int ()(struct tty_struct *tty)``h](h[TTY] }(hjN hhhNhNubj)}(h"``int ()(struct tty_struct *tty)``h]hint ()(struct tty_struct *tty)}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjN ubeh}(h]h ]h"]h$]h&]uh1hhjJ hK@hjK ubah}(h]h ]h"]h$]h&]uh1jhj/ ubeh}(h]h ]h"]h$]h&]uh1jhjJ hK@hj ubj)}(h4``close`` [TTY] ``void ()(struct tty_struct *tty)`` h](j)}(h ``close``h]j)}(hj| h]hclose}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjz ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKLhjv ubj)}(hhh]h)}(h)[TTY] ``void ()(struct tty_struct *tty)``h](h[TTY] }(hj hhhNhNubj)}(h#``void ()(struct tty_struct *tty)``h]hvoid ()(struct tty_struct *tty)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhj hKLhj ubah}(h]h ]h"]h$]h&]uh1jhjv ubeh}(h]h ]h"]h$]h&]uh1jhj hKLhj ubj)}(h;``flush_buffer`` [TTY] ``void ()(struct tty_struct *tty)`` h](j)}(h``flush_buffer``h]j)}(hj h]h flush_buffer}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKUhj ubj)}(hhh]h)}(h)[TTY] ``void ()(struct tty_struct *tty)``h](h[TTY] }(hj hhhNhNubj)}(h#``void ()(struct tty_struct *tty)``h]hvoid ()(struct tty_struct *tty)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhj hKUhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKUhj ubj)}(h]``read`` [TTY] ``ssize_t ()(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr)`` h](j)}(h``read``h]j)}(hj h]hread}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK^hj ubj)}(hhh]h)}(hS[TTY] ``ssize_t ()(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr)``h](h[TTY] }(hj# hhhNhNubj)}(hM``ssize_t ()(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr)``h]hIssize_t ()(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr)}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj# ubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK]hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hK^hj ubj)}(hd``write`` [TTY] ``ssize_t ()(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr)`` h](j)}(h ``write``h]j)}(hjR h]hwrite}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjP ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKihjL ubj)}(hhh]h)}(hY[TTY] ``ssize_t ()(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr)``h](h[TTY] }(hjk hhhNhNubj)}(hS``ssize_t ()(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr)``h]hOssize_t ()(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr)}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk ubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhhjh ubah}(h]h ]h"]h$]h&]uh1jhjL ubeh}(h]h ]h"]h$]h&]uh1jhjg hKihj ubj)}(hX``ioctl`` [TTY] ``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)`` h](j)}(h ``ioctl``h]j)}(hj h]hioctl}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKthj ubj)}(hhh]h)}(hM[TTY] ``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)``h](h[TTY] }(hj hhhNhNubj)}(hG``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)``h]hCint ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKshj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKthj ubj)}(h_``compat_ioctl`` [TTY] ``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)`` h](j)}(h``compat_ioctl``h]j)}(hj h]h compat_ioctl}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj ubj)}(hhh]h)}(hM[TTY] ``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)``h](h[TTY] }(hj hhhNhNubj)}(hG``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)``h]hCint ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj ubj)}(hV``set_termios`` [TTY] ``void ()(struct tty_struct *tty, const struct ktermios *old)`` h](j)}(h``set_termios``h]j)}(hj* h]h set_termios}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj( ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj$ ubj)}(hhh]h)}(hE[TTY] ``void ()(struct tty_struct *tty, const struct ktermios *old)``h](h[TTY] }(hjC hhhNhNubj)}(h?``void ()(struct tty_struct *tty, const struct ktermios *old)``h]h;void ()(struct tty_struct *tty, const struct ktermios *old)}(hjK hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjC ubeh}(h]h ]h"]h$]h&]uh1hhj? hKhj@ ubah}(h]h ]h"]h$]h&]uh1jhj$ ubeh}(h]h ]h"]h$]h&]uh1jhj? hKhj ubj)}(he``poll`` [TTY] ``int ()(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait)`` h](j)}(h``poll``h]j)}(hjq h]hpoll}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjo ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjk ubj)}(hhh]h)}(h[[TTY] ``int ()(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait)``h](h[TTY] }(hj hhhNhNubj)}(hU``int ()(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait)``h]hQint ()(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhjk ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj ubj)}(h5``hangup`` [TTY] ``void ()(struct tty_struct *tty)`` h](j)}(h ``hangup``h]j)}(hj h]hhangup}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj ubj)}(hhh]h)}(h)[TTY] ``void ()(struct tty_struct *tty)``h](h[TTY] }(hj hhhNhNubj)}(h#``void ()(struct tty_struct *tty)``h]hvoid ()(struct tty_struct *tty)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj ubj)}(hd``receive_buf`` [DRV] ``void ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)`` h](j)}(h``receive_buf``h]j)}(hjh]h receive_buf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj ubj)}(hhh]h)}(hS[DRV] ``void ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)``h](h[DRV] }(hjhhhNhNubj)}(hM``void ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)``h]hIvoid ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjhKhj ubj)}(h;``write_wakeup`` [DRV] ``void ()(struct tty_struct *tty)`` h](j)}(h``write_wakeup``h]j)}(hjHh]h write_wakeup}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjBubj)}(hhh]h)}(h)[DRV] ``void ()(struct tty_struct *tty)``h](h[DRV] }(hjahhhNhNubj)}(h#``void ()(struct tty_struct *tty)``h]hvoid ()(struct tty_struct *tty)}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]uh1hhj]hKhj^ubah}(h]h ]h"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]uh1jhj]hKhj ubj)}(hF``dcd_change`` [DRV] ``void ()(struct tty_struct *tty, bool active)`` h](j)}(h``dcd_change``h]j)}(hjh]h dcd_change}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubj)}(hhh]h)}(h6[DRV] ``void ()(struct tty_struct *tty, bool active)``h](h[DRV] }(hjhhhNhNubj)}(h0``void ()(struct tty_struct *tty, bool active)``h]h,void ()(struct tty_struct *tty, bool active)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj ubj)}(hh``receive_buf2`` [DRV] ``ssize_t ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)`` h](j)}(h``receive_buf2``h]j)}(hjh]h receive_buf2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubj)}(hhh]h)}(hV[DRV] ``ssize_t ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)``h](h[DRV] }(hjhhhNhNubj)}(hP``ssize_t ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)``h]hLssize_t ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj ubj)}(hf``lookahead_buf`` [DRV] ``void ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)`` h](j)}(h``lookahead_buf``h]j)}(hjh]h lookahead_buf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubj)}(hhh]h)}(hS[DRV] ``void ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)``h](h[DRV] }(hj7hhhNhNubj)}(hM``void ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)``h]hIvoid ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj4ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj3hKhj ubj)}(h@``owner`` module containting this ldisc (for reference counting)h](j)}(h ``owner``h]j)}(hjfh]howner}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj`ubj)}(hhh]h)}(h6module containting this ldisc (for reference counting)h]h6module containting this ldisc (for reference counting)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj|ubah}(h]h ]h"]h$]h&]uh1jhj`ubeh}(h]h ]h"]h$]h&]uh1jhj{hKhj ubeh}(h]h ]h"]h$]h&]uh1jhj> ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhj hNubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj hhubh block_quote)}(hXbThis function is called when the line discipline is associated with the **tty**. No other call into the line discipline for this tty will occur until it completes successfully. It should initialize any state needed by the ldisc, and set **tty->receive_room** to the maximum amount of data the line discipline is willing to accept from the driver with a single call to **receive_buf\(\)**. Returning an error will prevent the ldisc from being attached. Optional. Can sleep. This function is called when the line discipline is being shutdown, either because the **tty** is being closed or because the **tty** is being changed to use a new line discipline. At the point of execution no further users will enter the ldisc code for this tty. Optional. Can sleep. This function instructs the line discipline to clear its buffers of any input characters it may have queued to be delivered to the user mode process. It may be called at any point between open and close. Optional. This function is called when the user requests to read from the **tty**. The line discipline will return whatever characters it has buffered up for the user. If this function is not defined, the user will receive an ``EIO`` error. Multiple read calls may occur in parallel and the ldisc must deal with serialization issues. Optional: ``EIO`` unless provided. Can sleep. This function is called when the user requests to write to the **tty**. The line discipline will deliver the characters to the low-level tty device for transmission, optionally performing some processing on the characters first. If this function is not defined, the user will receive an ``EIO`` error. Optional: ``EIO`` unless provided. Can sleep. This function is called when the user requests an ioctl which is not handled by the tty layer or the low-level tty driver. It is intended for ioctls which affect line discpline operation. Note that the search order for ioctls is (1) tty layer, (2) tty low-level driver, (3) line discpline. So a low-level driver can "grab" an ioctl request before the line discpline has a chance to see it. Optional. Process ioctl calls from 32-bit process on 64-bit system. Note that only ioctls that are neither "pointer to compatible structure" nor tty-generic. Something private that takes an integer or a pointer to wordsize-sensitive structure belongs here, but most of ldiscs will happily leave it ``NULL``. Optional. This function notifies the line discpline that a change has been made to the termios structure. Optional. This function is called when a user attempts to select/poll on a **tty** device. It is solely the responsibility of the line discipline to handle poll requests. Optional. Called on a hangup. Tells the discipline that it should cease I/O to the tty driver. The driver should seek to perform this action quickly but should wait until any pending driver I/O is completed. No further calls into the ldisc code will occur. Optional. Can sleep. This function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. **cp** is a pointer to the buffer of input character received by the device. **fp** is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. **fp** may be ``NULL`` to indicate all data received is ``TTY_NORMAL``. Optional. This function is called by the low-level tty driver to signal that line discpline should try to send more characters to the low-level driver for transmission. If the line discpline does not have any more data to send, it can just return. If the line discipline does have some data to send, please arise a tasklet or workqueue to do the real data transfer. Do not send data in this hook, it may lead to a deadlock. Optional. Tells the discipline that the DCD pin has changed its status. Used exclusively by the ``N_PPS`` (Pulse-Per-Second) line discipline. Optional. This function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. **cp** is a pointer to the buffer of input character received by the device. **fp** is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. **fp** may be ``NULL`` to indicate all data received is ``TTY_NORMAL``. If assigned, prefer this function for automatic flow control. Optional. This function is called by the low-level tty driver for characters not eaten by ->receive_buf() or ->receive_buf2(). It is useful for processing high-priority characters such as software flow-control characters that could otherwise get stuck into the intermediate buffer until tty has room to receive them. Ldisc must be able to handle later a ->receive_buf() or ->receive_buf2() call for the same characters (e.g. by skipping the actions for high-priority characters already handled by ->lookahead_buf()). Optional. h](h)}(hXThis function is called when the line discipline is associated with the **tty**. No other call into the line discipline for this tty will occur until it completes successfully. It should initialize any state needed by the ldisc, and set **tty->receive_room** to the maximum amount of data the line discipline is willing to accept from the driver with a single call to **receive_buf\(\)**. Returning an error will prevent the ldisc from being attached.h](hHThis function is called when the line discipline is associated with the }(hjhhhNhNubj)}(h**tty**h]htty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. No other call into the line discipline for this tty will occur until it completes successfully. It should initialize any state needed by the ldisc, and set }(hjhhhNhNubj)}(h**tty->receive_room**h]htty->receive_room}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhn to the maximum amount of data the line discipline is willing to accept from the driver with a single call to }(hjhhhNhNubj)}(h**receive_buf\(\)**h]hreceive_buf()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh@. Returning an error will prevent the ldisc from being attached.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK@hjubh)}(hOptional. Can sleep.h]hOptional. Can sleep.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKHhjubh)}(hXThis function is called when the line discipline is being shutdown, either because the **tty** is being closed or because the **tty** is being changed to use a new line discipline. At the point of execution no further users will enter the ldisc code for this tty.h](hWThis function is called when the line discipline is being shutdown, either because the }(hjhhhNhNubj)}(h**tty**h]htty}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is being closed or because the }(hjhhhNhNubj)}(h**tty**h]htty}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is being changed to use a new line discipline. At the point of execution no further users will enter the ldisc code for this tty.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKKhjubh)}(hOptional. Can sleep.h]hOptional. Can sleep.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKPhjubh)}(hThis function instructs the line discipline to clear its buffers of any input characters it may have queued to be delivered to the user mode process. It may be called at any point between open and close.h]hThis function instructs the line discipline to clear its buffers of any input characters it may have queued to be delivered to the user mode process. It may be called at any point between open and close.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKShjubh)}(h Optional.h]h Optional.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKWhjubh)}(hXCThis function is called when the user requests to read from the **tty**. The line discipline will return whatever characters it has buffered up for the user. If this function is not defined, the user will receive an ``EIO`` error. Multiple read calls may occur in parallel and the ldisc must deal with serialization issues.h](h@This function is called when the user requests to read from the }(hjyhhhNhNubj)}(h**tty**h]htty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubh. The line discipline will return whatever characters it has buffered up for the user. If this function is not defined, the user will receive an }(hjyhhhNhNubj)}(h``EIO``h]hEIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubhd error. Multiple read calls may occur in parallel and the ldisc must deal with serialization issues.}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKZhjubh)}(h-Optional: ``EIO`` unless provided. Can sleep.h](h Optional: }(hjhhhNhNubj)}(h``EIO``h]hEIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh unless provided. Can sleep.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK`hjubh)}(hX-This function is called when the user requests to write to the **tty**. The line discipline will deliver the characters to the low-level tty device for transmission, optionally performing some processing on the characters first. If this function is not defined, the user will receive an ``EIO`` error.h](h?This function is called when the user requests to write to the }(hjhhhNhNubj)}(h**tty**h]htty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. The line discipline will deliver the characters to the low-level tty device for transmission, optionally performing some processing on the characters first. If this function is not defined, the user will receive an }(hjhhhNhNubj)}(h``EIO``h]hEIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh error.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKchjubh)}(h-Optional: ``EIO`` unless provided. Can sleep.h](h Optional: }(hjhhhNhNubj)}(h``EIO``h]hEIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh unless provided. Can sleep.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKihjubh)}(hXThis function is called when the user requests an ioctl which is not handled by the tty layer or the low-level tty driver. It is intended for ioctls which affect line discpline operation. Note that the search order for ioctls is (1) tty layer, (2) tty low-level driver, (3) line discpline. So a low-level driver can "grab" an ioctl request before the line discpline has a chance to see it.h]hXThis function is called when the user requests an ioctl which is not handled by the tty layer or the low-level tty driver. It is intended for ioctls which affect line discpline operation. Note that the search order for ioctls is (1) tty layer, (2) tty low-level driver, (3) line discpline. So a low-level driver can “grab” an ioctl request before the line discpline has a chance to see it.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKlhjubh)}(h Optional.h]h Optional.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKshjubh)}(h9Process ioctl calls from 32-bit process on 64-bit system.h]h9Process ioctl calls from 32-bit process on 64-bit system.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKvhjubh)}(hNote that only ioctls that are neither "pointer to compatible structure" nor tty-generic. Something private that takes an integer or a pointer to wordsize-sensitive structure belongs here, but most of ldiscs will happily leave it ``NULL``.h](hNote that only ioctls that are neither “pointer to compatible structure” nor tty-generic. Something private that takes an integer or a pointer to wordsize-sensitive structure belongs here, but most of ldiscs will happily leave it }(hjNhhhNhNubj)}(h``NULL``h]hNULL}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubh.}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKxhjubh)}(h Optional.h]h Optional.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK}hjubh)}(h_This function notifies the line discpline that a change has been made to the termios structure.h]h_This function notifies the line discpline that a change has been made to the termios structure.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(h Optional.h]h Optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(hThis function is called when a user attempts to select/poll on a **tty** device. It is solely the responsibility of the line discipline to handle poll requests.h](hAThis function is called when a user attempts to select/poll on a }(hjhhhNhNubj)}(h**tty**h]htty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX device. It is solely the responsibility of the line discipline to handle poll requests.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(h Optional.h]h Optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(hCalled on a hangup. Tells the discipline that it should cease I/O to the tty driver. The driver should seek to perform this action quickly but should wait until any pending driver I/O is completed. No further calls into the ldisc code will occur.h]hCalled on a hangup. Tells the discipline that it should cease I/O to the tty driver. The driver should seek to perform this action quickly but should wait until any pending driver I/O is completed. No further calls into the ldisc code will occur.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(hOptional. Can sleep.h]hOptional. Can sleep.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(hXThis function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. **cp** is a pointer to the buffer of input character received by the device. **fp** is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. **fp** may be ``NULL`` to indicate all data received is ``TTY_NORMAL``.h](hThis function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. }(hjhhhNhNubj)}(h**cp**h]hcp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhG is a pointer to the buffer of input character received by the device. }(hjhhhNhNubj)}(h**fp**h]hfp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhr is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. }(hjhhhNhNubj)}(h**fp**h]hfp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh may be }(hjhhhNhNubj)}(h``NULL``h]hNULL}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh" to indicate all data received is }(hjhhhNhNubj)}(h``TTY_NORMAL``h]h TTY_NORMAL}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(h Optional.h]h Optional.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(hXThis function is called by the low-level tty driver to signal that line discpline should try to send more characters to the low-level driver for transmission. If the line discpline does not have any more data to send, it can just return. If the line discipline does have some data to send, please arise a tasklet or workqueue to do the real data transfer. Do not send data in this hook, it may lead to a deadlock.h]hXThis function is called by the low-level tty driver to signal that line discpline should try to send more characters to the low-level driver for transmission. If the line discpline does not have any more data to send, it can just return. If the line discipline does have some data to send, please arise a tasklet or workqueue to do the real data transfer. Do not send data in this hook, it may lead to a deadlock.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(h Optional.h]h Optional.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(hTells the discipline that the DCD pin has changed its status. Used exclusively by the ``N_PPS`` (Pulse-Per-Second) line discipline.h](hVTells the discipline that the DCD pin has changed its status. Used exclusively by the }(hjhhhNhNubj)}(h ``N_PPS``h]hN_PPS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh$ (Pulse-Per-Second) line discipline.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(h Optional.h]h Optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(hXThis function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. **cp** is a pointer to the buffer of input character received by the device. **fp** is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. **fp** may be ``NULL`` to indicate all data received is ``TTY_NORMAL``. If assigned, prefer this function for automatic flow control.h](hThis function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. }(hjhhhNhNubj)}(h**cp**h]hcp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhH is a pointer to the buffer of input character received by the device. }(hjhhhNhNubj)}(h**fp**h]hfp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhr is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. }(hjhhhNhNubj)}(h**fp**h]hfp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh may be }(hjhhhNhNubj)}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh" to indicate all data received is }(hjhhhNhNubj)}(h``TTY_NORMAL``h]h TTY_NORMAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh?. If assigned, prefer this function for automatic flow control.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(h Optional.h]h Optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(hXThis function is called by the low-level tty driver for characters not eaten by ->receive_buf() or ->receive_buf2(). It is useful for processing high-priority characters such as software flow-control characters that could otherwise get stuck into the intermediate buffer until tty has room to receive them. Ldisc must be able to handle later a ->receive_buf() or ->receive_buf2() call for the same characters (e.g. by skipping the actions for high-priority characters already handled by ->lookahead_buf()).h]hXThis function is called by the low-level tty driver for characters not eaten by ->receive_buf() or ->receive_buf2(). It is useful for processing high-priority characters such as software flow-control characters that could otherwise get stuck into the intermediate buffer until tty has room to receive them. Ldisc must be able to handle later a ->receive_buf() or ->receive_buf2() call for the same characters (e.g. by skipping the actions for high-priority characters already handled by ->lookahead_buf()).}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(h Optional.h]h Optional.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubeh}(h]h ]h"]h$]h&]uh1jhj hK@hj hhubh)}(hThis structure defines the interface between the tty line discipline implementation and the tty routines. The above routines can be defined. Unless noted otherwise, they are optional, and can be filled in with a ``NULL`` pointer.h](hThis structure defines the interface between the tty line discipline implementation and the tty routines. The above routines can be defined. Unless noted otherwise, they are optional, and can be filled in with a }(hjLhhhNhNubj)}(h``NULL``h]hNULL}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLubh pointer.}(hjLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj hhubh)}(hZHooks marked [TTY] are invoked from the TTY core, the [DRV] ones from the tty_driver side.h]hZHooks marked [TTY] are invoked from the TTY core, the [DRV] ones from the tty_driver side.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj hhubeh}(h]jFah ]h"]$line discipline operations referenceah$]h&]uh1hhhhhhhhK,ubh)}(hhh](h)}(h Driver Accessh]h Driver Access}(hjhhhNhNubah}(h]h ]h"]h$]h&]j3jbuh1hhjhhhhhK2ubh)}(hLine discipline methods can call the methods of the underlying hardware driver. These are documented as a part of struct tty_operations.h]hLine discipline methods can call the methods of the underlying hardware driver. These are documented as a part of struct tty_operations.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjhhubeh}(h]jhah ]h"] driver accessah$]h&]uh1hhhhhhhhK2ubh)}(hhh](h)}(h TTY Flagsh]h TTY Flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]j3juh1hhjhhhhhK8ubh)}(haLine discipline methods have access to :c:member:`tty_struct.flags` field. See :doc:`tty_struct`.h](h'Line discipline methods have access to }(hjhhhNhNubh)}(h:c:member:`tty_struct.flags`h]j)}(hjh]htty_struct.flags}(hjhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypemember refexplicitrefwarnjj)}j]sbjtty_struct.flagsuh1hhhhK:hjubh field. See }(hjhhhNhNubh)}(h:doc:`tty_struct`h]j)}(hjh]h tty_struct}(hjhhhNhNubah}(h]h ](jstdstd-doceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypedoc refexplicitrefwarnj tty_structuh1hhhhK:hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK:hjhhubeh}(h]jah ]h"] tty flagsah$]h&]uh1hhhhhhhhK8ubh)}(hhh](h)}(hLockingh]hLocking}(hjhhhNhNubah}(h]h ]h"]h$]h&]j3juh1hhjhhhhhK>ubh)}(hCallers to the line discipline functions from the tty layer are required to take line discipline locks. The same is true of calls from the driver side but not yet enforced.h]hCallers to the line discipline functions from the tty layer are required to take line discipline locks. The same is true of calls from the driver side but not yet enforced.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK@hjhhubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]tty_ldisc_ref_wait (C function)c.tty_ldisc_ref_waithNtauh1jPhjhhhNhNubjb)}(hhh](jg)}(h>struct tty_ldisc * tty_ldisc_ref_wait (struct tty_struct *tty)h]jm)}(hubh)}(hhh](h)}(hInternal Functionsh]hInternal Functions}(hj%hhhNhNubah}(h]h ]h"]h$]h&]j3juh1hhj"hhhhhKRubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]tty_ldisc_get (C function)c.tty_ldisc_gethNtauh1jPhj"hhhNhNubjb)}(hhh](jg)}(hCstruct tty_ldisc * tty_ldisc_get (struct tty_struct *tty, int disc)h]jm)}(hAstruct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)h](j)}(hjh]hstruct}(hjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKzubj)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHhhhjYhKzubh)}(hhh]j)}(h tty_ldisch]h tty_ldisc}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmmodnameN classnameNjj)}j]j")}j tty_ldisc_getsbc.tty_ldisc_getasbuh1hhjHhhhjYhKzubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHhhhjYhKzubj6)}(hj9h]h*}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjHhhhjYhKzubj)}(h tty_ldisc_geth]j)}(hjh]h tty_ldisc_get}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjHhhhjYhKzubj)}(h"(struct tty_struct *tty, int disc)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.tty_ldisc_getasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj6)}(hj9h]h*}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(httyh]htty}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hint disch](js)}(hinth]hint}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhj2ubj)}(h h]h }(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubj)}(hdisch]hdisc}(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjHhhhjYhKzubeh}(h]h ]h"]h$]h&]hhjguh1jljhjihjDhhhjYhKzubah}(h]j?ah ](jmjneh"]h$]h&]jrjs)jthuh1jfhjYhKzhjAhhubjv)}(hhh]h)}(htake a reference to an ldisch]htake a reference to an ldisc}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKzhjyhhubah}(h]h ]h"]h$]h&]uh1juhjAhhhjYhKzubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jahhhj"hNhNubj)}(hX}**Parameters** ``struct tty_struct *tty`` tty device ``int disc`` ldisc number **Description** Takes a reference to a line discipline. Deals with refcounts and module locking counts. If the discipline is not available, its module loaded, if possible. Locking: takes ``tty_ldiscs_lock`` to guard against ldisc races **Return** * -``EINVAL`` if the discipline index is not [``N_TTY`` .. ``NR_LDISCS``] or if the discipline is not registered * -``EAGAIN`` if request_module() failed to load or register the discipline * -``ENOMEM`` if allocation failure * Otherwise, returns a pointer to the discipline and bumps the ref counth](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chK~hjubj)}(hhh](j)}(h&``struct tty_struct *tty`` tty device h](j)}(h``struct tty_struct *tty``h]j)}(hjh]hstruct tty_struct *tty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chK{hjubj)}(hhh]h)}(h tty deviceh]h tty device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK{hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK{hjubj)}(h``int disc`` ldisc number h](j)}(h ``int disc``h]j)}(hjh]hint disc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chK|hjubj)}(hhh]h)}(h ldisc numberh]h ldisc number}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK|hj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hK|hjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hj1h]h Description}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chK~hjubh)}(hTakes a reference to a line discipline. Deals with refcounts and module locking counts. If the discipline is not available, its module loaded, if possible.h]hTakes a reference to a line discipline. Deals with refcounts and module locking counts. If the discipline is not available, its module loaded, if possible.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chK}hjubh)}(h?Locking: takes ``tty_ldiscs_lock`` to guard against ldisc racesh](hLocking: takes }(hjVhhhNhNubj)}(h``tty_ldiscs_lock``h]htty_ldiscs_lock}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubh to guard against ldisc races}(hjVhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjubh)}(h **Return**h]j)}(hjyh]hReturn}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjubh)}(hhh](h)}(hn-``EINVAL`` if the discipline index is not [``N_TTY`` .. ``NR_LDISCS``] or if the discipline is not registeredh]h)}(hn-``EINVAL`` if the discipline index is not [``N_TTY`` .. ``NR_LDISCS``] or if the discipline is not registeredh](h-}(hjhhhNhNubj)}(h ``EINVAL``h]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh! if the discipline index is not [}(hjhhhNhNubj)}(h ``N_TTY``h]hN_TTY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh .. }(hjhhhNhNubj)}(h ``NR_LDISCS``h]h NR_LDISCS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh(] or if the discipline is not registered}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hI-``EAGAIN`` if request_module() failed to load or register the disciplineh]h)}(hjh](h-}(hjhhhNhNubj)}(h ``EAGAIN``h]hEAGAIN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh> if request_module() failed to load or register the discipline}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h!-``ENOMEM`` if allocation failureh]h)}(hj h](h-}(hjhhhNhNubj)}(h ``ENOMEM``h]hENOMEM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh if allocation failure}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhj ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hFOtherwise, returns a pointer to the discipline and bumps the ref counth]h)}(hj7h]hFOtherwise, returns a pointer to the discipline and bumps the ref count}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhj5ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]bulletj9uh1hhjhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj"hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]tty_ldisc_put (C function)c.tty_ldisc_puthNtauh1jPhj"hhhNhNubjb)}(hhh](jg)}(h)void tty_ldisc_put (struct tty_ldisc *ld)h]jm)}(h(void tty_ldisc_put(struct tty_ldisc *ld)h](js)}(hvoidh]hvoid}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhjphhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjphhhjhKubj)}(h tty_ldisc_puth]j)}(h tty_ldisc_puth]h tty_ldisc_put}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjphhhjhKubj)}(h(struct tty_ldisc *ld)h]j)}(hstruct tty_ldisc *ldh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h tty_ldisch]h tty_ldisc}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j")}jjsbc.tty_ldisc_putasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj6)}(hj9h]h*}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(hldh]hld}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjphhhjhKubeh}(h]h ]h"]h$]h&]hhjguh1jljhjihjlhhhjhKubah}(h]jgah ](jmjneh"]h$]h&]jrjs)jthuh1jfhjhKhjihhubjv)}(hhh]h)}(hrelease the ldisch]hrelease the ldisc}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhj1hhubah}(h]h ]h"]h$]h&]uh1juhjihhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]jjjjLjjLjjjuh1jahhhj"hNhNubj)}(hm**Parameters** ``struct tty_ldisc *ld`` lisdsc to release **Description** Complement of tty_ldisc_get().h](h)}(h**Parameters**h]j)}(hjVh]h Parameters}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjPubj)}(hhh]j)}(h+``struct tty_ldisc *ld`` lisdsc to release h](j)}(h``struct tty_ldisc *ld``h]j)}(hjuh]hstruct tty_ldisc *ld}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjoubj)}(hhh]h)}(hlisdsc to releaseh]hlisdsc to release}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]uh1jhjhKhjlubah}(h]h ]h"]h$]h&]uh1jhjPubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjPubh)}(hComplement of tty_ldisc_get().h]hComplement of tty_ldisc_get().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjPubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj"hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]"tty_set_termios_ldisc (C function)c.tty_set_termios_ldischNtauh1jPhj"hhhNhNubjb)}(hhh](jg)}(h=void tty_set_termios_ldisc (struct tty_struct *tty, int disc)h]jm)}(hldisc**h](h)}(h**Parameters**h]j)}(hjr*h]h Parameters}(hjt*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp*ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM\hjl*ubj)}(hhh]j)}(h.``struct tty_struct *tty`` tty being released h](j)}(h``struct tty_struct *tty``h]j)}(hj*h]hstruct tty_struct *tty}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMYhj*ubj)}(hhh]h)}(htty being releasedh]htty being released}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hMYhj*ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj*hMYhj*ubah}(h]h ]h"]h$]h&]uh1jhjl*ubh)}(h**Description**h]j)}(hj*h]h Description}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM[hjl*ubh)}(h9Perform final close of the ldisc and reset **tty->ldisc**h](h+Perform final close of the ldisc and reset }(hj*hhhNhNubj)}(h**tty->ldisc**h]h tty->ldisc}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMZhjl*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj"hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]tty_reset_termios (C function)c.tty_reset_termioshNtauh1jPhj"hhhNhNubjb)}(hhh](jg)}(h/void tty_reset_termios (struct tty_struct *tty)h]jm)}(h.void tty_reset_termios(struct tty_struct *tty)h](js)}(hvoidh]hvoid}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhj+hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMlubj)}(h h]h }(hj.+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+hhhj-+hMlubj)}(htty_reset_termiosh]j)}(htty_reset_termiosh]htty_reset_termios}(hj@+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<+ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj+hhhj-+hMlubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj\+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjX+ubj)}(h h]h }(hji+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjX+ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjz+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw+ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj|+modnameN classnameNjj)}j]j")}jjB+sbc.tty_reset_termiosasbuh1hhjX+ubj)}(h h]h }(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjX+ubj6)}(hj9h]h*}(hj+hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjX+ubj)}(httyh]htty}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjX+ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjT+ubah}(h]h ]h"]h$]h&]hhuh1jhj+hhhj-+hMlubeh}(h]h ]h"]h$]h&]hhjguh1jljhjihj+hhhj-+hMlubah}(h]j+ah ](jmjneh"]h$]h&]jrjs)jthuh1jfhj-+hMlhj+hhubjv)}(hhh]h)}(hreset terminal stateh]hreset terminal state}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMlhj+hhubah}(h]h ]h"]h$]h&]uh1juhj+hhhj-+hMlubeh}(h]h ](jfunctioneh"]h$]h&]jjjj+jj+jjjuh1jahhhj"hNhNubj)}(h{**Parameters** ``struct tty_struct *tty`` tty to reset **Description** Restore a terminal to the driver default state.h](h)}(h**Parameters**h]j)}(hj,h]h Parameters}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMphj+ubj)}(hhh]j)}(h(``struct tty_struct *tty`` tty to reset h](j)}(h``struct tty_struct *tty``h]j)}(hj ,h]hstruct tty_struct *tty}(hj",hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMmhj,ubj)}(hhh]h)}(h tty to reseth]h tty to reset}(hj9,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5,hMmhj6,ubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhj5,hMmhj,ubah}(h]h ]h"]h$]h&]uh1jhj+ubh)}(h**Description**h]j)}(hj[,h]h Description}(hj],hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjY,ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMohj+ubh)}(h/Restore a terminal to the driver default state.h]h/Restore a terminal to the driver default state.}(hjq,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMnhj+ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj"hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]tty_ldisc_reinit (C function)c.tty_ldisc_reinithNtauh1jPhj"hhhNhNubjb)}(hhh](jg)}(h7int tty_ldisc_reinit (struct tty_struct *tty, int disc)h]jm)}(h6int tty_ldisc_reinit(struct tty_struct *tty, int disc)h](js)}(hinth]hint}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhj,hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM|ubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,hhhj,hM|ubj)}(htty_ldisc_reinith]j)}(htty_ldisc_reinith]htty_ldisc_reinit}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj,hhhj,hM|ubj)}(h"(struct tty_struct *tty, int disc)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj,modnameN classnameNjj)}j]j")}jj,sbc.tty_ldisc_reinitasbuh1hhj,ubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubj6)}(hj9h]h*}(hj)-hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj,ubj)}(httyh]htty}(hj6-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj,ubj)}(hint disch](js)}(hinth]hint}(hjO-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhjK-ubj)}(h h]h }(hj]-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjK-ubj)}(hdisch]hdisc}(hjk-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjK-ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj,ubeh}(h]h ]h"]h$]h&]hhuh1jhj,hhhj,hM|ubeh}(h]h ]h"]h$]h&]hhjguh1jljhjihj,hhhj,hM|ubah}(h]j,ah ](jmjneh"]h$]h&]jrjs)jthuh1jfhj,hM|hj,hhubjv)}(hhh]h)}(hreinitialise the tty ldisch]hreinitialise the tty ldisc}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM|hj-hhubah}(h]h ]h"]h$]h&]uh1juhj,hhhj,hM|ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj-jj-jjjuh1jahhhj"hNhNubj)}(hX**Parameters** ``struct tty_struct *tty`` tty to reinit ``int disc`` line discipline to reinitialize **Description** Completely reinitialize the line discipline state, by closing the current instance, if there is one, and opening a new instance. If an error occurs opening the new non-``N_TTY`` instance, the instance is dropped and **tty->ldisc** reset to ``NULL``. The caller can then retry with ``N_TTY`` instead. **Return** 0 if successful, otherwise error code < 0h](h)}(h**Parameters**h]j)}(hj-h]h Parameters}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj-ubj)}(hhh](j)}(h)``struct tty_struct *tty`` tty to reinit h](j)}(h``struct tty_struct *tty``h]j)}(hj-h]hstruct tty_struct *tty}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM}hj-ubj)}(hhh]h)}(h tty to reinith]h tty to reinit}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hM}hj-ubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhj-hM}hj-ubj)}(h-``int disc`` line discipline to reinitialize h](j)}(h ``int disc``h]j)}(hj.h]hint disc}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj .ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM~hj .ubj)}(hhh]h)}(hline discipline to reinitializeh]hline discipline to reinitialize}(hj(.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$.hM~hj%.ubah}(h]h ]h"]h$]h&]uh1jhj .ubeh}(h]h ]h"]h$]h&]uh1jhj$.hM~hj-ubeh}(h]h ]h"]h$]h&]uh1jhj-ubh)}(h**Description**h]j)}(hjJ.h]h Description}(hjL.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH.ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj-ubh)}(hX+Completely reinitialize the line discipline state, by closing the current instance, if there is one, and opening a new instance. If an error occurs opening the new non-``N_TTY`` instance, the instance is dropped and **tty->ldisc** reset to ``NULL``. The caller can then retry with ``N_TTY`` instead.h](hCompletely reinitialize the line discipline state, by closing the current instance, if there is one, and opening a new instance. If an error occurs opening the new non-}(hj`.hhhNhNubj)}(h ``N_TTY``h]hN_TTY}(hjh.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`.ubh' instance, the instance is dropped and }(hj`.hhhNhNubj)}(h**tty->ldisc**h]h tty->ldisc}(hjz.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`.ubh reset to }(hj`.hhhNhNubj)}(h``NULL``h]hNULL}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`.ubh!. The caller can then retry with }(hj`.hhhNhNubj)}(h ``N_TTY``h]hN_TTY}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`.ubh instead.}(hj`.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj-ubh)}(h **Return**h]j)}(hj.h]hReturn}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj-ubh)}(h)0 if successful, otherwise error code < 0h]h)0 if successful, otherwise error code < 0}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj"hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]tty_ldisc_hangup (C function)c.tty_ldisc_hanguphNtauh1jPhj"hhhNhNubjb)}(hhh](jg)}(h;void tty_ldisc_hangup (struct tty_struct *tty, bool reinit)h]jm)}(h:void tty_ldisc_hangup(struct tty_struct *tty, bool reinit)h](js)}(hvoidh]hvoid}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhj.hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMubj)}(h h]h }(hj /hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.hhhj /hMubj)}(htty_ldisc_hanguph]j)}(htty_ldisc_hanguph]htty_ldisc_hangup}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj.hhhj /hMubj)}(h%(struct tty_struct *tty, bool reinit)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj;/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7/ubj)}(h h]h }(hjH/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7/ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjY/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV/ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj[/modnameN classnameNjj)}j]j")}jj!/sbc.tty_ldisc_hangupasbuh1hhj7/ubj)}(h h]h }(hjy/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7/ubj6)}(hj9h]h*}(hj/hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj7/ubj)}(httyh]htty}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7/ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj3/ubj)}(h bool reinith](js)}(hboolh]hbool}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhj/ubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubj)}(hreinith]hreinit}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj3/ubeh}(h]h ]h"]h$]h&]hhuh1jhj.hhhj /hMubeh}(h]h ]h"]h$]h&]hhjguh1jljhjihj.hhhj /hMubah}(h]j.ah ](jmjneh"]h$]h&]jrjs)jthuh1jfhj /hMhj.hhubjv)}(hhh]h)}(hhangup ldisc reseth]hhangup ldisc reset}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj/hhubah}(h]h ]h"]h$]h&]uh1juhj.hhhj /hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj 0jj 0jjjuh1jahhhj"hNhNubj)}(hX**Parameters** ``struct tty_struct *tty`` tty being hung up ``bool reinit`` whether to re-initialise the tty **Description** Some tty devices reset their termios when they receive a hangup event. In that situation we must also switch back to ``N_TTY`` properly before we reset the termios data. Locking: We can take the ldisc mutex as the rest of the code is careful to allow for this. In the pty pair case this occurs in the close() path of the tty itself so we must be careful about locking rules.h](h)}(h**Parameters**h]j)}(hj0h]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj0ubj)}(hhh](j)}(h-``struct tty_struct *tty`` tty being hung up h](j)}(h``struct tty_struct *tty``h]j)}(hj40h]hstruct tty_struct *tty}(hj60hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj20ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj.0ubj)}(hhh]h)}(htty being hung uph]htty being hung up}(hjM0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjI0hMhjJ0ubah}(h]h ]h"]h$]h&]uh1jhj.0ubeh}(h]h ]h"]h$]h&]uh1jhjI0hMhj+0ubj)}(h1``bool reinit`` whether to re-initialise the tty h](j)}(h``bool reinit``h]j)}(hjm0h]h bool reinit}(hjo0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk0ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjg0ubj)}(hhh]h)}(h whether to re-initialise the ttyh]h whether to re-initialise the tty}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMhj0ubah}(h]h ]h"]h$]h&]uh1jhjg0ubeh}(h]h ]h"]h$]h&]uh1jhj0hMhj+0ubeh}(h]h ]h"]h$]h&]uh1jhj0ubh)}(h**Description**h]j)}(hj0h]h Description}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj0ubh)}(hSome tty devices reset their termios when they receive a hangup event. In that situation we must also switch back to ``N_TTY`` properly before we reset the termios data.h](huSome tty devices reset their termios when they receive a hangup event. In that situation we must also switch back to }(hj0hhhNhNubj)}(h ``N_TTY``h]hN_TTY}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh+ properly before we reset the termios data.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj0ubh)}(hZLocking: We can take the ldisc mutex as the rest of the code is careful to allow for this.h]hZLocking: We can take the ldisc mutex as the rest of the code is careful to allow for this.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj0ubh)}(hqIn the pty pair case this occurs in the close() path of the tty itself so we must be careful about locking rules.h]hqIn the pty pair case this occurs in the close() path of the tty itself so we must be careful about locking rules.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj0ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj"hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]tty_ldisc_setup (C function)c.tty_ldisc_setuphNtauh1jPhj"hhhNhNubjb)}(hhh](jg)}(hFint tty_ldisc_setup (struct tty_struct *tty, struct tty_struct *o_tty)h]jm)}(hEint tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty)h](js)}(hinth]hint}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhj1hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMubj)}(h h]h }(hj,1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1hhhj+1hMubj)}(htty_ldisc_setuph]j)}(htty_ldisc_setuph]htty_ldisc_setup}(hj>1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:1ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj1hhhj+1hMubj)}(h2(struct tty_struct *tty, struct tty_struct *o_tty)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjZ1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV1ubj)}(h h]h }(hjg1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV1ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjx1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhju1ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjz1modnameN classnameNjj)}j]j")}jj@1sbc.tty_ldisc_setupasbuh1hhjV1ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV1ubj6)}(hj9h]h*}(hj1hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjV1ubj)}(httyh]htty}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV1ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjR1ubj)}(hstruct tty_struct *o_ttyh](j)}(hjh]hstruct}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj1modnameN classnameNjj)}j]j1c.tty_ldisc_setupasbuh1hhj1ubj)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubj6)}(hj9h]h*}(hj2hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj1ubj)}(ho_ttyh]ho_tty}(hj#2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjR1ubeh}(h]h ]h"]h$]h&]hhuh1jhj1hhhj+1hMubeh}(h]h ]h"]h$]h&]hhjguh1jljhjihj1hhhj+1hMubah}(h]j1ah ](jmjneh"]h$]h&]jrjs)jthuh1jfhj+1hMhj1hhubjv)}(hhh]h)}(hopen line disciplineh]hopen line discipline}(hjM2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjJ2hhubah}(h]h ]h"]h$]h&]uh1juhj1hhhj+1hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjje2jje2jjjuh1jahhhj"hNhNubj)}(hX?**Parameters** ``struct tty_struct *tty`` tty being shut down ``struct tty_struct *o_tty`` pair tty for pty/tty pairs **Description** Called during the initial open of a tty/pty pair in order to set up the line disciplines and bind them to the **tty**. This has no locking issues as the device isn't yet active.h](h)}(h**Parameters**h]j)}(hjo2h]h Parameters}(hjq2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm2ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhji2ubj)}(hhh](j)}(h/``struct tty_struct *tty`` tty being shut down h](j)}(h``struct tty_struct *tty``h]j)}(hj2h]hstruct tty_struct *tty}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj2ubj)}(hhh]h)}(htty being shut downh]htty being shut down}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhj2hMhj2ubj)}(h8``struct tty_struct *o_tty`` pair tty for pty/tty pairs h](j)}(h``struct tty_struct *o_tty``h]j)}(hj2h]hstruct tty_struct *o_tty}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj2ubj)}(hhh]h)}(hpair tty for pty/tty pairsh]hpair tty for pty/tty pairs}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhj2hMhj2ubeh}(h]h ]h"]h$]h&]uh1jhji2ubh)}(h**Description**h]j)}(hj3h]h Description}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhji2ubh)}(hCalled during the initial open of a tty/pty pair in order to set up the line disciplines and bind them to the **tty**. This has no locking issues as the device isn't yet active.h](hnCalled during the initial open of a tty/pty pair in order to set up the line disciplines and bind them to the }(hj3hhhNhNubj)}(h**tty**h]htty}(hj 3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh>. This has no locking issues as the device isn’t yet active.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhji2ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj"hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]tty_ldisc_release (C function)c.tty_ldisc_releasehNtauh1jPhj"hhhNhNubjb)}(hhh](jg)}(h/void tty_ldisc_release (struct tty_struct *tty)h]jm)}(h.void tty_ldisc_release(struct tty_struct *tty)h](js)}(hvoidh]hvoid}(hjY3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhjU3hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMubj)}(h h]h }(hjh3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjU3hhhjg3hMubj)}(htty_ldisc_releaseh]j)}(htty_ldisc_releaseh]htty_ldisc_release}(hjz3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjv3ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjU3hhhjg3hMubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubj)}(h h]h }(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj3modnameN classnameNjj)}j]j")}jj|3sbc.tty_ldisc_releaseasbuh1hhj3ubj)}(h h]h }(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubj6)}(hj9h]h*}(hj3hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj3ubj)}(httyh]htty}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj3ubah}(h]h ]h"]h$]h&]hhuh1jhjU3hhhjg3hMubeh}(h]h ]h"]h$]h&]hhjguh1jljhjihjQ3hhhjg3hMubah}(h]jL3ah ](jmjneh"]h$]h&]jrjs)jthuh1jfhjg3hMhjN3hhubjv)}(hhh]h)}(hrelease line disciplineh]hrelease line discipline}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj4hhubah}(h]h ]h"]h$]h&]uh1juhjN3hhhjg3hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj14jj14jjjuh1jahhhj"hNhNubj)}(h**Parameters** ``struct tty_struct *tty`` tty being shut down (or one end of pty pair) **Description** Called during the final close of a tty or a pty pair in order to shut down the line discpline layer. On exit, each tty's ldisc is ``NULL``.h](h)}(h**Parameters**h]j)}(hj;4h]h Parameters}(hj=4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj94ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj54ubj)}(hhh]j)}(hH``struct tty_struct *tty`` tty being shut down (or one end of pty pair) h](j)}(h``struct tty_struct *tty``h]j)}(hjZ4h]hstruct tty_struct *tty}(hj\4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjX4ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjT4ubj)}(hhh]h)}(h,tty being shut down (or one end of pty pair)h]h,tty being shut down (or one end of pty pair)}(hjs4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjo4hMhjp4ubah}(h]h ]h"]h$]h&]uh1jhjT4ubeh}(h]h ]h"]h$]h&]uh1jhjo4hMhjQ4ubah}(h]h ]h"]h$]h&]uh1jhj54ubh)}(h**Description**h]j)}(hj4h]h Description}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj54ubh)}(hCalled during the final close of a tty or a pty pair in order to shut down the line discpline layer. On exit, each tty's ldisc is ``NULL``.h](hCalled during the final close of a tty or a pty pair in order to shut down the line discpline layer. On exit, each tty’s ldisc is }(hj4hhhNhNubj)}(h``NULL``h]hNULL}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj54ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj"hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]tty_ldisc_init (C function)c.tty_ldisc_inithNtauh1jPhj"hhhNhNubjb)}(hhh](jg)}(h+int tty_ldisc_init (struct tty_struct *tty)h]jm)}(h*int tty_ldisc_init(struct tty_struct *tty)h](js)}(hinth]hint}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhj4hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMubj)}(h h]h }(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4hhhj4hMubj)}(htty_ldisc_inith]j)}(htty_ldisc_inith]htty_ldisc_init}(hj 5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 5ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj4hhhj4hMubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj)5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%5ubj)}(h h]h }(hj65hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%5ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjG5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD5ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjI5modnameN classnameNjj)}j]j")}jj5sbc.tty_ldisc_initasbuh1hhj%5ubj)}(h h]h }(hjg5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%5ubj6)}(hj9h]h*}(hju5hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj%5ubj)}(httyh]htty}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%5ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj!5ubah}(h]h ]h"]h$]h&]hhuh1jhj4hhhj4hMubeh}(h]h ]h"]h$]h&]hhjguh1jljhjihj4hhhj4hMubah}(h]j4ah ](jmjneh"]h$]h&]jrjs)jthuh1jfhj4hMhj4hhubjv)}(hhh]h)}(hldisc setup for new ttyh]hldisc setup for new tty}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj5hhubah}(h]h ]h"]h$]h&]uh1juhj4hhhj4hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj5jj5jjjuh1jahhhj"hNhNubj)}(h**Parameters** ``struct tty_struct *tty`` tty being allocated **Description** Set up the line discipline objects for a newly allocated tty. Note that the tty structure is not completely set up when this call is made.h](h)}(h**Parameters**h]j)}(hj5h]h Parameters}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj5ubj)}(hhh]j)}(h/``struct tty_struct *tty`` tty being allocated h](j)}(h``struct tty_struct *tty``h]j)}(hj5h]hstruct tty_struct *tty}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj5ubj)}(hhh]h)}(htty being allocatedh]htty being allocated}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hMhj6ubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhj6hMhj5ubah}(h]h ]h"]h$]h&]uh1jhj5ubh)}(h**Description**h]j)}(hj(6h]h Description}(hj*6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&6ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj5ubh)}(hSet up the line discipline objects for a newly allocated tty. Note that the tty structure is not completely set up when this call is made.h]hSet up the line discipline objects for a newly allocated tty. Note that the tty structure is not completely set up when this call is made.}(hj>6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj5ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj"hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]tty_ldisc_deinit (C function)c.tty_ldisc_deinithNtauh1jPhj"hhhNhNubjb)}(hhh](jg)}(h.void tty_ldisc_deinit (struct tty_struct *tty)h]jm)}(h-void tty_ldisc_deinit(struct tty_struct *tty)h](js)}(hvoidh]hvoid}(hjm6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhji6hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM,ubj)}(h h]h }(hj|6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhji6hhhj{6hM,ubj)}(htty_ldisc_deinith]j)}(htty_ldisc_deinith]htty_ldisc_deinit}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubah}(h]h ](jjeh"]h$]h&]hhuh1jhji6hhhj{6hM,ubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj6modnameN classnameNjj)}j]j")}jj6sbc.tty_ldisc_deinitasbuh1hhj6ubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubj6)}(hj9h]h*}(hj6hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj6ubj)}(httyh]htty}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj6ubah}(h]h ]h"]h$]h&]hhuh1jhji6hhhj{6hM,ubeh}(h]h ]h"]h$]h&]hhjguh1jljhjihje6hhhj{6hM,ubah}(h]j`6ah ](jmjneh"]h$]h&]jrjs)jthuh1jfhj{6hM,hjb6hhubjv)}(hhh]h)}(hldisc cleanup for new ttyh]hldisc cleanup for new tty}(hj-7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM,hj*7hhubah}(h]h ]h"]h$]h&]uh1juhjb6hhhj{6hM,ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjE7jjE7jjjuh1jahhhj"hNhNubj)}(h**Parameters** ``struct tty_struct *tty`` tty that was allocated recently **Description** The tty structure must not be completely set up (tty_ldisc_setup()) when this call is made.h](h)}(h**Parameters**h]j)}(hjO7h]h Parameters}(hjQ7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjM7ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM0hjI7ubj)}(hhh]j)}(h;``struct tty_struct *tty`` tty that was allocated recently h](j)}(h``struct tty_struct *tty``h]j)}(hjn7h]hstruct tty_struct *tty}(hjp7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjl7ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM-hjh7ubj)}(hhh]h)}(htty that was allocated recentlyh]htty that was allocated recently}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hM-hj7ubah}(h]h ]h"]h$]h&]uh1jhjh7ubeh}(h]h ]h"]h$]h&]uh1jhj7hM-hje7ubah}(h]h ]h"]h$]h&]uh1jhjI7ubh)}(h**Description**h]j)}(hj7h]h Description}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM/hjI7ubh)}(h[The tty structure must not be completely set up (tty_ldisc_setup()) when this call is made.h]h[The tty structure must not be completely set up (tty_ldisc_setup()) when this call is made.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM.hjI7ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj"hhhNhNubeh}(h]jah ]h"]internal functionsah$]h&]uh1hhhhhhhhKRubeh}(h]tty-line-disciplineah ]h"]tty line disciplineah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj8error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j7j7jjjjj j$jjFjjhjjjjj7ju nametypes}(j7jjj jjjjj7uh}(j7hjhjj"j_jhjcjhj$jj8j=jjjFj j j jhjjjjjjDjIjSjXj!j&jj"j?jDjgjljjj j j.#j3#jX%j]%jG'jL'j)j)j+j+j,j,j.j.j1j1jL3jQ3j4j4j`6je6hhjjj@j7jbjYjj{jjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j8KsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.