Commit a846dcf9 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman

tty: localise ptychar and make it const

ptychar was not const, so mark it as such. And move this variable to the
only place where it's used.
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210302062214.29627-36-jslaby@suse.czSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a872ab4d
......@@ -1196,8 +1196,6 @@ int tty_send_xchar(struct tty_struct *tty, char ch)
return 0;
}
static char ptychar[] = "pqrstuvwxyzabcde";
/**
* pty_line_name - generate name for a pty
* @driver: the tty driver in use
......@@ -1211,6 +1209,7 @@ static char ptychar[] = "pqrstuvwxyzabcde";
*/
static void pty_line_name(struct tty_driver *driver, int index, char *p)
{
static const char ptychar[] = "pqrstuvwxyzabcde";
int i = index + driver->name_base;
/* ->name is initialized to "ttyp", but "tty" is expected */
sprintf(p, "%s%c%x",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment