.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com) |
---|
3 | | - * Licensed under the GPL |
---|
4 | 4 | */ |
---|
5 | 5 | |
---|
6 | 6 | #include <linux/slab.h> |
---|
.. | .. |
---|
247 | 247 | deactivate_fd(chan->fd, irq); |
---|
248 | 248 | } |
---|
249 | 249 | |
---|
250 | | -void reactivate_chan(struct chan *chan, int irq) |
---|
251 | | -{ |
---|
252 | | - if (chan && chan->enabled) |
---|
253 | | - reactivate_fd(chan->fd, irq); |
---|
254 | | -} |
---|
255 | | - |
---|
256 | 250 | int write_chan(struct chan *chan, const char *buf, int len, |
---|
257 | 251 | int write_irq) |
---|
258 | 252 | { |
---|
.. | .. |
---|
264 | 258 | n = chan->ops->write(chan->fd, buf, len, chan->data); |
---|
265 | 259 | if (chan->primary) { |
---|
266 | 260 | ret = n; |
---|
267 | | - if ((ret == -EAGAIN) || ((ret >= 0) && (ret < len))) |
---|
268 | | - reactivate_fd(chan->fd, write_irq); |
---|
269 | 261 | } |
---|
270 | 262 | return ret; |
---|
271 | 263 | } |
---|
.. | .. |
---|
563 | 555 | tty_insert_flip_char(port, c, TTY_NORMAL); |
---|
564 | 556 | } while (err > 0); |
---|
565 | 557 | |
---|
566 | | - if (err == 0) |
---|
567 | | - reactivate_fd(chan->fd, irq); |
---|
568 | 558 | if (err == -EIO) { |
---|
569 | 559 | if (chan->primary) { |
---|
570 | 560 | tty_port_tty_hangup(&line->port, false); |
---|