diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2013-06-15 09:36:05 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-23 19:47:08 -0400 |
commit | 2cf7b67e87f0d8db025cff12b5d29c0663bbcd87 (patch) | |
tree | cdfa32cd0796b6ed58bd909427aebf2783a74690 /drivers/tty/tty_buffer.c | |
parent | 11b9faa44df76189b8346ff602a2c01c610c37eb (diff) |
tty: Use generic names for flip buffer list cursors
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_buffer.c')
-rw-r--r-- | drivers/tty/tty_buffer.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index a428fa2f7259..0259a766b875 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c | |||
@@ -44,15 +44,15 @@ static void tty_buffer_reset(struct tty_buffer *p, size_t size) | |||
44 | void tty_buffer_free_all(struct tty_port *port) | 44 | void tty_buffer_free_all(struct tty_port *port) |
45 | { | 45 | { |
46 | struct tty_bufhead *buf = &port->buf; | 46 | struct tty_bufhead *buf = &port->buf; |
47 | struct tty_buffer *thead; | 47 | struct tty_buffer *p; |
48 | 48 | ||
49 | while ((thead = buf->head) != NULL) { | 49 | while ((p = buf->head) != NULL) { |
50 | buf->head = thead->next; | 50 | buf->head = p->next; |
51 | kfree(thead); | 51 | kfree(p); |
52 | } | 52 | } |
53 | while ((thead = buf->free) != NULL) { | 53 | while ((p = buf->free) != NULL) { |
54 | buf->free = thead->next; | 54 | buf->free = p->next; |
55 | kfree(thead); | 55 | kfree(p); |
56 | } | 56 | } |
57 | buf->tail = NULL; | 57 | buf->tail = NULL; |
58 | buf->memory_used = 0; | 58 | buf->memory_used = 0; |
@@ -143,13 +143,13 @@ static void tty_buffer_free(struct tty_port *port, struct tty_buffer *b) | |||
143 | static void __tty_buffer_flush(struct tty_port *port) | 143 | static void __tty_buffer_flush(struct tty_port *port) |
144 | { | 144 | { |
145 | struct tty_bufhead *buf = &port->buf; | 145 | struct tty_bufhead *buf = &port->buf; |
146 | struct tty_buffer *thead; | 146 | struct tty_buffer *next; |
147 | 147 | ||
148 | if (unlikely(buf->head == NULL)) | 148 | if (unlikely(buf->head == NULL)) |
149 | return; | 149 | return; |
150 | while ((thead = buf->head->next) != NULL) { | 150 | while ((next = buf->head->next) != NULL) { |
151 | tty_buffer_free(port, buf->head); | 151 | tty_buffer_free(port, buf->head); |
152 | buf->head = thead; | 152 | buf->head = next; |
153 | } | 153 | } |
154 | WARN_ON(buf->head != buf->tail); | 154 | WARN_ON(buf->head != buf->tail); |
155 | buf->head->read = buf->head->commit; | 155 | buf->head->read = buf->head->commit; |