s390/raw3270: make raw3270_buffer_address() accept x/y coordinates
authorSven Schnelle <svens@linux.ibm.com>
Sat, 26 Nov 2022 19:18:21 +0000 (20:18 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 9 Jan 2023 13:34:00 +0000 (14:34 +0100)
commitf77f936afe1ea9342725bff0bd0f7aaa54699794
tree6b9b12c6dfde4f2f12ccac8524ba83c9e7756b8e
parentb2057c870231edce4105c9825f8e5e1f20aebabc
s390/raw3270: make raw3270_buffer_address() accept x/y coordinates

All callers of raw3270_buffer_address() are calculating the offset
from some x/y coordinates. Move that calculation inside of the
function, so user can pass the x/y values directly. Note that
negative values are relative to the end-of-line or end-of-screen.

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>
drivers/s390/char/con3270.c
drivers/s390/char/raw3270.c
drivers/s390/char/raw3270.h