diff options
author | Sven Schnelle <svens@linux.ibm.com> | 2022-11-28 19:40:44 +0100 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-01-09 14:33:59 +0100 |
commit | e22de7d7910ab9490b191da5fac0592214b340d5 (patch) | |
tree | 48c99d512731f607c5ba13c67eee8eae4618b543 /drivers/s390/char/con3270.c | |
parent | 970cf9a97a27d3f9a72a17aa6aedb47758478c33 (diff) | |
download | linux-stable-e22de7d7910ab9490b191da5fac0592214b340d5.tar.gz linux-stable-e22de7d7910ab9490b191da5fac0592214b340d5.tar.bz2 linux-stable-e22de7d7910ab9490b191da5fac0592214b340d5.zip |
s390/tty3270: add AID defines
Use AID_* instead of hex numbers to make the code a bit
easier to read. also convert the if/else blocks to a
switch statement in tty3270_read_tasklet().
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Tested-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390/char/con3270.c')
-rw-r--r-- | drivers/s390/char/con3270.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c index 7ff116c38715..0dea178c0f56 100644 --- a/drivers/s390/char/con3270.c +++ b/drivers/s390/char/con3270.c @@ -565,7 +565,8 @@ static void tty3270_read_tasklet(unsigned long data) */ input = NULL; len = 0; - if (tp->input->string[0] == 0x7d) { + switch (tp->input->string[0]) { + case AID_ENTER: /* Enter: write input to tty. */ input = tp->input->string + 6; len = tp->input->len - 6 - rrq->rescnt; @@ -579,10 +580,13 @@ static void tty3270_read_tasklet(unsigned long data) /* Clear input area. */ tty3270_update_prompt(tp, NULL, 0); tty3270_set_timer(tp, 1); - } else if (tp->input->string[0] == 0x6d) { + break; + case AID_CLEAR: /* Display has been cleared. Redraw. */ tp->update_flags = TTY_UPDATE_ALL; tty3270_set_timer(tp, 1); + default: + break; } spin_unlock_irq(&tp->view.lock); |