From 19475209331168cdb8070a011650535f1c54a730 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Wed, 5 May 2021 11:19:10 +0200 Subject: tty: drop tty_ldisc_ops::refcount The refcount is checked only in tty_unregister_ldisc and EBUSY returned if it is nonzero. But none of the tty_unregister_ldisc callers act anyhow if this (or any other) error is returned. So remove tty_ldisc_ops::refcount completely and make tty_unregister_ldisc return 'void' in the next patches. That means we assume tty_unregister_ldisc is not called while the ldisc might be in use. That relies on try_module_get in get_ldops and module_put in put_ldops. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-18-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman --- include/linux/tty_ldisc.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/linux/tty_ldisc.h') diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index c20ca6a75b4c..fbe9de278629 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h @@ -208,8 +208,6 @@ struct tty_ldisc_ops { const char *fp, int count); struct module *owner; - - int refcount; }; struct tty_ldisc { -- cgit v1.2.3-59-g8ed1b