aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_buffer.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-09-22 13:54:20 +0200
committerTakashi Iwai <tiwai@suse.de>2022-09-22 13:54:20 +0200
commitaf45a0d32df9c8f5abbbc7401d70ffa296c8cef6 (patch)
treef162ece8fa7d94374d15801d614849db649282ac /drivers/tty/tty_buffer.c
parentALSA: hda/ca0132 - remove the unneeded result variable (diff)
parentALSA: hda: intel-dsp-config: add missing RaptorLake PCI IDs (diff)
downloadlinux-dev-af45a0d32df9c8f5abbbc7401d70ffa296c8cef6.tar.xz
linux-dev-af45a0d32df9c8f5abbbc7401d70ffa296c8cef6.zip
Merge branch 'for-linus' into for-next
Diffstat (limited to 'drivers/tty/tty_buffer.c')
-rw-r--r--drivers/tty/tty_buffer.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index 9fdecc795b6b..5e287dedce01 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -470,7 +470,6 @@ static void lookahead_bufs(struct tty_port *port, struct tty_buffer *head)
while (head) {
struct tty_buffer *next;
- unsigned char *p, *f = NULL;
unsigned int count;
/*
@@ -489,11 +488,16 @@ static void lookahead_bufs(struct tty_port *port, struct tty_buffer *head)
continue;
}
- p = char_buf_ptr(head, head->lookahead);
- if (~head->flags & TTYB_NORMAL)
- f = flag_buf_ptr(head, head->lookahead);
+ if (port->client_ops->lookahead_buf) {
+ unsigned char *p, *f = NULL;
+
+ p = char_buf_ptr(head, head->lookahead);
+ if (~head->flags & TTYB_NORMAL)
+ f = flag_buf_ptr(head, head->lookahead);
+
+ port->client_ops->lookahead_buf(port, p, f, count);
+ }
- port->client_ops->lookahead_buf(port, p, f, count);
head->lookahead += count;
}
}