summaryrefslogtreecommitdiff
path: root/drivers/s390
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-07-06 00:08:24 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-07-06 00:08:24 +0300
commitc932ed0adb09a7fa6d6649ee04dd78c83ab07ada (patch)
tree02b055bd7b350e7aca9104a9c69330896bb6382b /drivers/s390
parenta16d8644bad461bb073b92e812080ea6715ddf2b (diff)
parent15279ebe99d7c6142d9f1a6ae4ded66c0f168678 (diff)
downloadlinux-c932ed0adb09a7fa6d6649ee04dd78c83ab07ada.tar.xz
Merge tag 'tty-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty / serial updates from Greg KH: "Here is the big set of tty and serial driver patches for 5.14-rc1. A bit more than normal, but nothing major, lots of cleanups. Highlights are: - lots of tty api cleanups and mxser driver cleanups from Jiri - build warning fixes - various serial driver updates - coding style cleanups - various tty driver minor fixes and updates - removal of broken and disable r3964 line discipline (finally!) All of these have been in linux-next for a while with no reported issues" * tag 'tty-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (227 commits) serial: mvebu-uart: remove unused member nb from struct mvebu_uart arm64: dts: marvell: armada-37xx: Fix reg for standard variant of UART dt-bindings: mvebu-uart: fix documentation serial: mvebu-uart: correctly calculate minimal possible baudrate serial: mvebu-uart: do not allow changing baudrate when uartclk is not available serial: mvebu-uart: fix calculation of clock divisor tty: make linux/tty_flip.h self-contained serial: Prefer unsigned int to bare use of unsigned serial: 8250: 8250_omap: Fix possible interrupt storm on K3 SoCs serial: qcom_geni_serial: use DT aliases according to DT bindings Revert "tty: serial: Add UART driver for Cortina-Access platform" tty: serial: Add UART driver for Cortina-Access platform MAINTAINERS: add me back as mxser maintainer mxser: Documentation, fix typos mxser: Documentation, make the docs up-to-date mxser: Documentation, remove traces of callout device mxser: introduce mxser_16550A_or_MUST helper mxser: rename flags to old_speed in mxser_set_serial_info mxser: use port variable in mxser_set_serial_info mxser: access info->MCR under info->slock ...
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/char/con3215.c4
-rw-r--r--drivers/s390/char/sclp_rw.c4
-rw-r--r--drivers/s390/char/sclp_rw.h2
-rw-r--r--drivers/s390/char/sclp_tty.c9
-rw-r--r--drivers/s390/char/sclp_vt220.c9
-rw-r--r--drivers/s390/char/tty3270.c22
6 files changed, 15 insertions, 35 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
index 02523f4e29f4..67c0009ca545 100644
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -925,7 +925,7 @@ static void tty3215_close(struct tty_struct *tty, struct file * filp)
/*
* Returns the amount of free space in the output buffer.
*/
-static int tty3215_write_room(struct tty_struct *tty)
+static unsigned int tty3215_write_room(struct tty_struct *tty)
{
struct raw3215_info *raw = tty->driver_data;
@@ -981,7 +981,7 @@ static void tty3215_flush_chars(struct tty_struct *tty)
/*
* Returns the number of characters in the output buffer
*/
-static int tty3215_chars_in_buffer(struct tty_struct *tty)
+static unsigned int tty3215_chars_in_buffer(struct tty_struct *tty)
{
struct raw3215_info *raw = tty->driver_data;
diff --git a/drivers/s390/char/sclp_rw.c b/drivers/s390/char/sclp_rw.c
index de44c15fe03a..1690326553b1 100644
--- a/drivers/s390/char/sclp_rw.c
+++ b/drivers/s390/char/sclp_rw.c
@@ -318,10 +318,10 @@ sclp_buffer_space(struct sclp_buffer *buffer)
/*
* Return number of characters in buffer
*/
-int
+unsigned int
sclp_chars_in_buffer(struct sclp_buffer *buffer)
{
- int count;
+ unsigned int count;
count = buffer->char_sum;
if (buffer->current_line != NULL)
diff --git a/drivers/s390/char/sclp_rw.h b/drivers/s390/char/sclp_rw.h
index a9127489f224..9b779ee4f979 100644
--- a/drivers/s390/char/sclp_rw.h
+++ b/drivers/s390/char/sclp_rw.h
@@ -86,6 +86,6 @@ void *sclp_unmake_buffer(struct sclp_buffer *);
int sclp_buffer_space(struct sclp_buffer *);
int sclp_write(struct sclp_buffer *buffer, const unsigned char *, int);
int sclp_emit_buffer(struct sclp_buffer *,void (*)(struct sclp_buffer *,int));
-int sclp_chars_in_buffer(struct sclp_buffer *);
+unsigned int sclp_chars_in_buffer(struct sclp_buffer *);
#endif /* __SCLP_RW_H__ */
diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c
index f5591bf82a8f..6be9de8ed37d 100644
--- a/drivers/s390/char/sclp_tty.c
+++ b/drivers/s390/char/sclp_tty.c
@@ -86,12 +86,12 @@ sclp_tty_close(struct tty_struct *tty, struct file *filp)
* a string of newlines. Every newline creates a new message which
* needs 82 bytes.
*/
-static int
+static unsigned int
sclp_tty_write_room (struct tty_struct *tty)
{
unsigned long flags;
struct list_head *l;
- int count;
+ unsigned int count;
spin_lock_irqsave(&sclp_tty_lock, flags);
count = 0;
@@ -280,15 +280,14 @@ sclp_tty_flush_chars(struct tty_struct *tty)
* characters in the write buffer (will not be written as long as there is a
* final line feed missing).
*/
-static int
+static unsigned int
sclp_tty_chars_in_buffer(struct tty_struct *tty)
{
unsigned long flags;
struct sclp_buffer *t;
- int count;
+ unsigned int count = 0;
spin_lock_irqsave(&sclp_tty_lock, flags);
- count = 0;
if (sclp_ttybuf != NULL)
count = sclp_chars_in_buffer(sclp_ttybuf);
list_for_each_entry(t, &sclp_tty_outqueue, list) {
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c
index fa40057fd18d..da2496306c04 100644
--- a/drivers/s390/char/sclp_vt220.c
+++ b/drivers/s390/char/sclp_vt220.c
@@ -604,12 +604,12 @@ sclp_vt220_flush_chars(struct tty_struct *tty)
* to change as output buffers get emptied, or if the output flow
* control is acted.
*/
-static int
+static unsigned int
sclp_vt220_write_room(struct tty_struct *tty)
{
unsigned long flags;
struct list_head *l;
- int count;
+ unsigned int count;
spin_lock_irqsave(&sclp_vt220_lock, flags);
count = 0;
@@ -624,16 +624,15 @@ sclp_vt220_write_room(struct tty_struct *tty)
/*
* Return number of buffered chars.
*/
-static int
+static unsigned int
sclp_vt220_chars_in_buffer(struct tty_struct *tty)
{
unsigned long flags;
struct list_head *l;
struct sclp_vt220_request *r;
- int count;
+ unsigned int count = 0;
spin_lock_irqsave(&sclp_vt220_lock, flags);
- count = 0;
if (sclp_vt220_current_request != NULL)
count = sclp_vt220_chars_stored(sclp_vt220_current_request);
list_for_each(l, &sclp_vt220_outqueue) {
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c
index 307a80f85c07..adc33846bf8e 100644
--- a/drivers/s390/char/tty3270.c
+++ b/drivers/s390/char/tty3270.c
@@ -1071,7 +1071,7 @@ static void tty3270_cleanup(struct tty_struct *tty)
/*
* We always have room.
*/
-static int
+static unsigned int
tty3270_write_room(struct tty_struct *tty)
{
return INT_MAX;
@@ -1640,7 +1640,7 @@ tty3270_do_write(struct tty3270 *tp, struct tty_struct *tty,
int i_msg, i;
spin_lock_bh(&tp->view.lock);
- for (i_msg = 0; !tty->stopped && i_msg < count; i_msg++) {
+ for (i_msg = 0; !tty->flow.stopped && i_msg < count; i_msg++) {
if (tp->esc_state != 0) {
/* Continue escape sequence. */
tty3270_escape_sequence(tp, buf[i_msg]);
@@ -1757,22 +1757,6 @@ tty3270_flush_chars(struct tty_struct *tty)
}
/*
- * Returns the number of characters in the output buffer. This is
- * used in tty_wait_until_sent to wait until all characters have
- * appeared on the screen.
- */
-static int
-tty3270_chars_in_buffer(struct tty_struct *tty)
-{
- return 0;
-}
-
-static void
-tty3270_flush_buffer(struct tty_struct *tty)
-{
-}
-
-/*
* Check for visible/invisible input switches
*/
static void
@@ -1892,8 +1876,6 @@ static const struct tty_operations tty3270_ops = {
.put_char = tty3270_put_char,
.flush_chars = tty3270_flush_chars,
.write_room = tty3270_write_room,
- .chars_in_buffer = tty3270_chars_in_buffer,
- .flush_buffer = tty3270_flush_buffer,
.throttle = tty3270_throttle,
.unthrottle = tty3270_unthrottle,
.hangup = tty3270_hangup,