Lines Matching refs:ldops
115 struct tty_ldisc_ops *ldops, *ret; in get_ldops() local
119 ldops = tty_ldiscs[disc]; in get_ldops()
120 if (ldops) { in get_ldops()
122 if (try_module_get(ldops->owner)) { in get_ldops()
123 ldops->refcount++; in get_ldops()
124 ret = ldops; in get_ldops()
131 static void put_ldops(struct tty_ldisc_ops *ldops) in put_ldops() argument
136 ldops->refcount--; in put_ldops()
137 module_put(ldops->owner); in put_ldops()
157 struct tty_ldisc_ops *ldops; in tty_ldisc_get() local
166 ldops = get_ldops(disc); in tty_ldisc_get()
167 if (IS_ERR(ldops)) { in tty_ldisc_get()
169 ldops = get_ldops(disc); in tty_ldisc_get()
170 if (IS_ERR(ldops)) in tty_ldisc_get()
171 return ERR_CAST(ldops); in tty_ldisc_get()
176 put_ldops(ldops); in tty_ldisc_get()
180 ld->ops = ldops; in tty_ldisc_get()
218 struct tty_ldisc_ops *ldops; in tty_ldiscs_seq_show() local
220 ldops = get_ldops(i); in tty_ldiscs_seq_show()
221 if (IS_ERR(ldops)) in tty_ldiscs_seq_show()
223 seq_printf(m, "%-10s %2d\n", ldops->name ? ldops->name : "???", i); in tty_ldiscs_seq_show()
224 put_ldops(ldops); in tty_ldiscs_seq_show()