Skip to content

Commit

Permalink
s390/3270: fix initialization order in tty3270_alloc_view
Browse files Browse the repository at this point in the history
Corrects the order of tasklet_init vs. the allocation of the
read request which has been broken by git commit 9d2ae23
"TTY: tty3270, move initialization to allocation".

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky committed Feb 14, 2013
1 parent 736c9fd commit 57985d7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions drivers/s390/char/tty3270.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,12 +683,6 @@ tty3270_alloc_view(void)
INIT_LIST_HEAD(&tp->update);
INIT_LIST_HEAD(&tp->rcl_lines);
tp->rcl_max = 20;
tty_port_init(&tp->port);
setup_timer(&tp->timer, (void (*)(unsigned long)) tty3270_update,
(unsigned long) tp);
tasklet_init(&tp->readlet,
(void (*)(unsigned long)) tty3270_read_tasklet,
(unsigned long) tp->read);

for (pages = 0; pages < TTY3270_STRING_PAGES; pages++) {
tp->freemem_pages[pages] = (void *)
Expand All @@ -710,6 +704,14 @@ tty3270_alloc_view(void)
tp->kbd = kbd_alloc();
if (!tp->kbd)
goto out_reset;

tty_port_init(&tp->port);
setup_timer(&tp->timer, (void (*)(unsigned long)) tty3270_update,
(unsigned long) tp);
tasklet_init(&tp->readlet,
(void (*)(unsigned long)) tty3270_read_tasklet,
(unsigned long) tp->read);

return tp;

out_reset:
Expand Down

0 comments on commit 57985d7

Please sign in to comment.