Lines Matching refs:ldops
112 struct tty_ldisc_ops *ldops, *ret; in get_ldops() local
116 ldops = tty_ldiscs[disc]; in get_ldops()
117 if (ldops) { in get_ldops()
119 if (try_module_get(ldops->owner)) { in get_ldops()
120 ldops->refcount++; in get_ldops()
121 ret = ldops; in get_ldops()
128 static void put_ldops(struct tty_ldisc_ops *ldops) in put_ldops() argument
133 ldops->refcount--; in put_ldops()
134 module_put(ldops->owner); in put_ldops()
154 struct tty_ldisc_ops *ldops; in tty_ldisc_get() local
163 ldops = get_ldops(disc); in tty_ldisc_get()
164 if (IS_ERR(ldops)) { in tty_ldisc_get()
166 ldops = get_ldops(disc); in tty_ldisc_get()
167 if (IS_ERR(ldops)) in tty_ldisc_get()
168 return ERR_CAST(ldops); in tty_ldisc_get()
173 put_ldops(ldops); in tty_ldisc_get()
177 ld->ops = ldops; in tty_ldisc_get()
215 struct tty_ldisc_ops *ldops; in tty_ldiscs_seq_show() local
217 ldops = get_ldops(i); in tty_ldiscs_seq_show()
218 if (IS_ERR(ldops)) in tty_ldiscs_seq_show()
220 seq_printf(m, "%-10s %2d\n", ldops->name ? ldops->name : "???", i); in tty_ldiscs_seq_show()
221 put_ldops(ldops); in tty_ldiscs_seq_show()