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()
163 struct tty_ldisc_ops *ldops; in tty_ldisc_get() local
172 ldops = get_ldops(disc); in tty_ldisc_get()
173 if (IS_ERR(ldops)) { in tty_ldisc_get()
177 ldops = get_ldops(disc); in tty_ldisc_get()
178 if (IS_ERR(ldops)) in tty_ldisc_get()
179 return ERR_CAST(ldops); in tty_ldisc_get()
187 ld->ops = ldops; in tty_ldisc_get()
225 struct tty_ldisc_ops *ldops; in tty_ldiscs_seq_show() local
227 ldops = get_ldops(i); in tty_ldiscs_seq_show()
228 if (IS_ERR(ldops)) in tty_ldiscs_seq_show()
230 seq_printf(m, "%-10s %2d\n", ldops->name ? ldops->name : "???", i); in tty_ldiscs_seq_show()
231 put_ldops(ldops); in tty_ldiscs_seq_show()