diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-21 05:57:27 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-21 05:57:27 +0200 |
commit | e10abc629f38efd9b6936cf3612583cc846104d9 (patch) | |
tree | 58fb8f6dba5d085d4b0352137d18faf7cfa47a69 /drivers/s390 | |
parent | Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cl... (diff) | |
parent | MAINTAINERS: 8250: remove website reference (diff) | |
download | linux-e10abc629f38efd9b6936cf3612583cc846104d9.tar.xz linux-e10abc629f38efd9b6936cf3612583cc846104d9.zip |
Merge tag 'tty-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty and serial driver updates from Greg KH:
"Here's the large TTY and Serial driver update for 4.7-rc1.
A few new serial drivers are added here, and Peter has fixed a bunch
of long-standing bugs in the tty layer and serial drivers as normal.
Full details in the shortlog.
All of these have been in linux-next for a while with no reported
issues"
* tag 'tty-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (88 commits)
MAINTAINERS: 8250: remove website reference
serial: core: Fix port mutex assert if lockdep disabled
serial: 8250_dw: fix wrong logic in dw8250_check_lcr()
tty: vt, finish looping on duplicate
tty: vt, return error when con_startup fails
QE-UART: add "fsl,t1040-ucc-uart" to of_device_id
serial: mctrl_gpio: Drop support for out1-gpios and out2-gpios
serial: 8250dw: Add device HID for future AMD UART controller
Fix OpenSSH pty regression on close
serial: mctrl_gpio: add IRQ locking
serial: 8250: Integrate Fintek into 8250_base
serial: mps2-uart: add support for early console
serial: mps2-uart: add MPS2 UART driver
dt-bindings: document the MPS2 UART bindings
serial: sirf: Use generic uart-has-rtscts DT property
serial: sirf: Introduce helper variable struct device_node *np
serial: mxs-auart: Use generic uart-has-rtscts DT property
serial: imx: Use generic uart-has-rtscts DT property
doc: DT: Add Generic Serial Device Tree Bindings
serial: 8250: of: Make tegra_serial_handle_break() static
...
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/con3215.c | 22 | ||||
-rw-r--r-- | drivers/s390/char/tty3270.c | 4 |
2 files changed, 12 insertions, 14 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index e7e078b3c7e6..931d10e86837 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c @@ -289,7 +289,7 @@ static void raw3215_timeout(unsigned long __data) spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); raw->flags &= ~RAW3215_TIMER_RUNS; - if (!(raw->port.flags & ASYNC_SUSPENDED)) { + if (!tty_port_suspended(&raw->port)) { raw3215_mk_write_req(raw); raw3215_start_io(raw); if ((raw->queued_read || raw->queued_write) && @@ -311,8 +311,7 @@ static void raw3215_timeout(unsigned long __data) */ static inline void raw3215_try_io(struct raw3215_info *raw) { - if (!(raw->port.flags & ASYNC_INITIALIZED) || - (raw->port.flags & ASYNC_SUSPENDED)) + if (!tty_port_initialized(&raw->port) || tty_port_suspended(&raw->port)) return; if (raw->queued_read != NULL) raw3215_start_io(raw); @@ -494,7 +493,7 @@ static void raw3215_make_room(struct raw3215_info *raw, unsigned int length) /* While console is frozen for suspend we have no other * choice but to drop message from the buffer to make * room for even more messages. */ - if (raw->port.flags & ASYNC_SUSPENDED) { + if (tty_port_suspended(&raw->port)) { raw3215_drop_line(raw); continue; } @@ -616,10 +615,10 @@ static int raw3215_startup(struct raw3215_info *raw) { unsigned long flags; - if (raw->port.flags & ASYNC_INITIALIZED) + if (tty_port_initialized(&raw->port)) return 0; raw->line_pos = 0; - raw->port.flags |= ASYNC_INITIALIZED; + tty_port_set_initialized(&raw->port, 1); spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); raw3215_try_io(raw); spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags); @@ -635,8 +634,7 @@ static void raw3215_shutdown(struct raw3215_info *raw) DECLARE_WAITQUEUE(wait, current); unsigned long flags; - if (!(raw->port.flags & ASYNC_INITIALIZED) || - (raw->flags & RAW3215_FIXED)) + if (!tty_port_initialized(&raw->port) || (raw->flags & RAW3215_FIXED)) return; /* Wait for outstanding requests, then free irq */ spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); @@ -650,7 +648,7 @@ static void raw3215_shutdown(struct raw3215_info *raw) spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); remove_wait_queue(&raw->empty_wait, &wait); set_current_state(TASK_RUNNING); - raw->port.flags &= ~ASYNC_INITIALIZED; + tty_port_set_initialized(&raw->port, 1); } spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags); } @@ -773,7 +771,7 @@ static int raw3215_pm_stop(struct ccw_device *cdev) raw = dev_get_drvdata(&cdev->dev); spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); raw3215_make_room(raw, RAW3215_BUFFER_SIZE); - raw->port.flags |= ASYNC_SUSPENDED; + tty_port_set_suspended(&raw->port, 1); spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags); return 0; } @@ -786,7 +784,7 @@ static int raw3215_pm_start(struct ccw_device *cdev) /* Allow I/O again and flush output buffer. */ raw = dev_get_drvdata(&cdev->dev); spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); - raw->port.flags &= ~ASYNC_SUSPENDED; + tty_port_set_suspended(&raw->port, 0); raw->flags |= RAW3215_FLUSHING; raw3215_try_io(raw); raw->flags &= ~RAW3215_FLUSHING; @@ -859,7 +857,7 @@ static void con3215_flush(void) unsigned long flags; raw = raw3215[0]; /* console 3215 is the first one */ - if (raw->port.flags & ASYNC_SUSPENDED) + if (tty_port_suspended(&raw->port)) /* The console is still frozen for suspend. */ if (ccw_device_force_console(raw->cdev)) /* Forcing didn't work, no panic message .. */ diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index 0a9f219fdc7c..272cb6cd1b2a 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c @@ -1860,7 +1860,7 @@ static int tty3270_ioctl(struct tty_struct *tty, unsigned int cmd, tp = tty->driver_data; if (!tp) return -ENODEV; - if (tty->flags & (1 << TTY_IO_ERROR)) + if (tty_io_error(tty)) return -EIO; return kbd_ioctl(tp->kbd, cmd, arg); } @@ -1874,7 +1874,7 @@ static long tty3270_compat_ioctl(struct tty_struct *tty, tp = tty->driver_data; if (!tp) return -ENODEV; - if (tty->flags & (1 << TTY_IO_ERROR)) + if (tty_io_error(tty)) return -EIO; return kbd_ioctl(tp->kbd, cmd, (unsigned long)compat_ptr(arg)); } |