Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/3270: fix initialization order in tty3270_alloc_view

Corrects the order of tasklet_init vs. the allocation of the
read request which has been broken by git commit 9d2ae233
"TTY: tty3270, move initialization to allocation".

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

+8 -6
+8 -6
drivers/s390/char/tty3270.c
··· 683 683 INIT_LIST_HEAD(&tp->update); 684 684 INIT_LIST_HEAD(&tp->rcl_lines); 685 685 tp->rcl_max = 20; 686 - tty_port_init(&tp->port); 687 - setup_timer(&tp->timer, (void (*)(unsigned long)) tty3270_update, 688 - (unsigned long) tp); 689 - tasklet_init(&tp->readlet, 690 - (void (*)(unsigned long)) tty3270_read_tasklet, 691 - (unsigned long) tp->read); 692 686 693 687 for (pages = 0; pages < TTY3270_STRING_PAGES; pages++) { 694 688 tp->freemem_pages[pages] = (void *) ··· 704 710 tp->kbd = kbd_alloc(); 705 711 if (!tp->kbd) 706 712 goto out_reset; 713 + 714 + tty_port_init(&tp->port); 715 + setup_timer(&tp->timer, (void (*)(unsigned long)) tty3270_update, 716 + (unsigned long) tp); 717 + tasklet_init(&tp->readlet, 718 + (void (*)(unsigned long)) tty3270_read_tasklet, 719 + (unsigned long) tp->read); 720 + 707 721 return tp; 708 722 709 723 out_reset: