forked from Minki/linux
tty: return void from tty_unregister_ldisc
Now that noone checks the return value of tty_unregister_ldisc, make the function return 'void'. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20210505091928.22010-20-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
357a6a875f
commit
f6f19595a7
@ -86,15 +86,13 @@ EXPORT_SYMBOL(tty_register_ldisc);
|
||||
* takes tty_ldiscs_lock to guard against ldisc races
|
||||
*/
|
||||
|
||||
int tty_unregister_ldisc(struct tty_ldisc_ops *ldisc)
|
||||
void tty_unregister_ldisc(struct tty_ldisc_ops *ldisc)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
raw_spin_lock_irqsave(&tty_ldiscs_lock, flags);
|
||||
tty_ldiscs[ldisc->num] = NULL;
|
||||
raw_spin_unlock_irqrestore(&tty_ldiscs_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(tty_unregister_ldisc);
|
||||
|
||||
|
@ -637,7 +637,7 @@ static inline int tty_port_users(struct tty_port *port)
|
||||
}
|
||||
|
||||
extern int tty_register_ldisc(struct tty_ldisc_ops *new_ldisc);
|
||||
extern int tty_unregister_ldisc(struct tty_ldisc_ops *ldisc);
|
||||
extern void tty_unregister_ldisc(struct tty_ldisc_ops *ldisc);
|
||||
extern int tty_set_ldisc(struct tty_struct *tty, int disc);
|
||||
extern int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p,
|
||||
const char *f, int count);
|
||||
|
Loading…
Reference in New Issue
Block a user