Lines Matching refs:ldops
113 struct tty_ldisc_ops *ldops, *ret; in get_ldops() local
117 ldops = tty_ldiscs[disc]; in get_ldops()
118 if (ldops) { in get_ldops()
120 if (try_module_get(ldops->owner)) { in get_ldops()
121 ldops->refcount++; in get_ldops()
122 ret = ldops; in get_ldops()
129 static void put_ldops(struct tty_ldisc_ops *ldops) in put_ldops() argument
134 ldops->refcount--; in put_ldops()
135 module_put(ldops->owner); in put_ldops()
169 struct tty_ldisc_ops *ldops; in tty_ldisc_get() local
178 ldops = get_ldops(disc); in tty_ldisc_get()
179 if (IS_ERR(ldops)) { in tty_ldisc_get()
183 ldops = get_ldops(disc); in tty_ldisc_get()
184 if (IS_ERR(ldops)) in tty_ldisc_get()
185 return ERR_CAST(ldops); in tty_ldisc_get()
193 ld->ops = ldops; in tty_ldisc_get()
231 struct tty_ldisc_ops *ldops; in tty_ldiscs_seq_show() local
233 ldops = get_ldops(i); in tty_ldiscs_seq_show()
234 if (IS_ERR(ldops)) in tty_ldiscs_seq_show()
236 seq_printf(m, "%-10s %2d\n", ldops->name ? ldops->name : "???", i); in tty_ldiscs_seq_show()
237 put_ldops(ldops); in tty_ldiscs_seq_show()