提交 b538c4ea 编写于 作者: J Jiri Slaby 提交者: Greg Kroah-Hartman

TTY: sclp_vt220, remove unused allocation

80 bytes which are allocated in tty->ops->open and assigned to
tty->driver_data are never used. Remove that.
Signed-off-by: NJiri Slaby <jslaby@suse.cz>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux390@de.ibm.com
Cc: linux-s390@vger.kernel.org
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 092f7377
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#define SCLP_VT220_DEVICE_NAME "ttysclp" #define SCLP_VT220_DEVICE_NAME "ttysclp"
#define SCLP_VT220_CONSOLE_NAME "ttyS" #define SCLP_VT220_CONSOLE_NAME "ttyS"
#define SCLP_VT220_CONSOLE_INDEX 1 /* console=ttyS1 */ #define SCLP_VT220_CONSOLE_INDEX 1 /* console=ttyS1 */
#define SCLP_VT220_BUF_SIZE 80
/* Representation of a single write request */ /* Representation of a single write request */
struct sclp_vt220_request { struct sclp_vt220_request {
...@@ -496,9 +495,6 @@ sclp_vt220_open(struct tty_struct *tty, struct file *filp) ...@@ -496,9 +495,6 @@ sclp_vt220_open(struct tty_struct *tty, struct file *filp)
{ {
if (tty->count == 1) { if (tty->count == 1) {
tty_port_tty_set(&sclp_vt220_port, tty); tty_port_tty_set(&sclp_vt220_port, tty);
tty->driver_data = kmalloc(SCLP_VT220_BUF_SIZE, GFP_KERNEL);
if (tty->driver_data == NULL)
return -ENOMEM;
tty->low_latency = 0; tty->low_latency = 0;
if (!tty->winsize.ws_row && !tty->winsize.ws_col) { if (!tty->winsize.ws_row && !tty->winsize.ws_col) {
tty->winsize.ws_row = 24; tty->winsize.ws_row = 24;
...@@ -514,11 +510,8 @@ sclp_vt220_open(struct tty_struct *tty, struct file *filp) ...@@ -514,11 +510,8 @@ sclp_vt220_open(struct tty_struct *tty, struct file *filp)
static void static void
sclp_vt220_close(struct tty_struct *tty, struct file *filp) sclp_vt220_close(struct tty_struct *tty, struct file *filp)
{ {
if (tty->count == 1) { if (tty->count == 1)
tty_port_tty_set(&sclp_vt220_port, NULL); tty_port_tty_set(&sclp_vt220_port, NULL);
kfree(tty->driver_data);
tty->driver_data = NULL;
}
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册