diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 15:26:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 15:26:52 -0400 |
commit | 3498d13b8090c0b0ef911409fbc503a7c4cca6ef (patch) | |
tree | 254ca00276e863d9fba25707690c66b2a04c49e9 /drivers/s390/char/con3215.c | |
parent | def7cb8cd4e3258db88050eaaca5438bcc3dafca (diff) | |
parent | 0c57dfcc6c1d037243c2f8fbf62eab3633326ec0 (diff) |
Merge tag 'tty-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull TTY changes from Greg Kroah-Hartman:
"As we skipped the merge window for 3.6-rc1 for the tty tree,
everything is now settled down and working properly, so we are ready
for 3.7-rc1. Here's the patchset, it's big, but the large changes are
removing a firmware file and adding a staging tty driver (it depended
on the tty core changes, so it's going through this tree instead of
the staging tree.)
All of these patches have been in the linux-next tree for a while.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
Fix up more-or-less trivial conflicts in
- drivers/char/pcmcia/synclink_cs.c:
tty NULL dereference fix vs tty_port_cts_enabled() helper function
- drivers/staging/{Kconfig,Makefile}:
add-add conflict (dgrp driver added close to other staging drivers)
- drivers/staging/ipack/devices/ipoctal.c:
"split ipoctal_channel from iopctal" vs "TTY: use tty_port_register_device"
* tag 'tty-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (235 commits)
tty/serial: Add kgdb_nmi driver
tty/serial/amba-pl011: Quiesce interrupts in poll_get_char
tty/serial/amba-pl011: Implement poll_init callback
tty/serial/core: Introduce poll_init callback
kdb: Turn KGDB_KDB=n stubs into static inlines
kdb: Implement disable_nmi command
kernel/debug: Mask KGDB NMI upon entry
serial: pl011: handle corruption at high clock speeds
serial: sccnxp: Make 'default' choice in switch last
serial: sccnxp: Remove mask termios caps for SW flow control
serial: sccnxp: Report actual baudrate back to core
serial: samsung: Add poll_get_char & poll_put_char
Powerpc 8xx CPM_UART setting MAXIDL register proportionaly to baud rate
Powerpc 8xx CPM_UART maxidl should not depend on fifo size
Powerpc 8xx CPM_UART too many interrupts
Powerpc 8xx CPM_UART desynchronisation
serial: set correct baud_base for EXSYS EX-41092 Dual 16950
serial: omap: fix the reciever line error case
8250: blacklist Winbond CIR port
8250_pnp: do pnp probe before legacy probe
...
Diffstat (limited to 'drivers/s390/char/con3215.c')
-rw-r--r-- | drivers/s390/char/con3215.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 6c0116d48c74..9ffb6d5f17aa 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c | |||
@@ -716,10 +716,17 @@ static int raw3215_probe (struct ccw_device *cdev) | |||
716 | static void raw3215_remove (struct ccw_device *cdev) | 716 | static void raw3215_remove (struct ccw_device *cdev) |
717 | { | 717 | { |
718 | struct raw3215_info *raw; | 718 | struct raw3215_info *raw; |
719 | unsigned int line; | ||
719 | 720 | ||
720 | ccw_device_set_offline(cdev); | 721 | ccw_device_set_offline(cdev); |
721 | raw = dev_get_drvdata(&cdev->dev); | 722 | raw = dev_get_drvdata(&cdev->dev); |
722 | if (raw) { | 723 | if (raw) { |
724 | spin_lock(&raw3215_device_lock); | ||
725 | for (line = 0; line < NR_3215; line++) | ||
726 | if (raw3215[line] == raw) | ||
727 | break; | ||
728 | raw3215[line] = NULL; | ||
729 | spin_unlock(&raw3215_device_lock); | ||
723 | dev_set_drvdata(&cdev->dev, NULL); | 730 | dev_set_drvdata(&cdev->dev, NULL); |
724 | raw3215_free_info(raw); | 731 | raw3215_free_info(raw); |
725 | } | 732 | } |
@@ -935,6 +942,19 @@ static int __init con3215_init(void) | |||
935 | console_initcall(con3215_init); | 942 | console_initcall(con3215_init); |
936 | #endif | 943 | #endif |
937 | 944 | ||
945 | static int tty3215_install(struct tty_driver *driver, struct tty_struct *tty) | ||
946 | { | ||
947 | struct raw3215_info *raw; | ||
948 | |||
949 | raw = raw3215[tty->index]; | ||
950 | if (raw == NULL) | ||
951 | return -ENODEV; | ||
952 | |||
953 | tty->driver_data = raw; | ||
954 | |||
955 | return tty_port_install(&raw->port, driver, tty); | ||
956 | } | ||
957 | |||
938 | /* | 958 | /* |
939 | * tty3215_open | 959 | * tty3215_open |
940 | * | 960 | * |
@@ -942,14 +962,9 @@ console_initcall(con3215_init); | |||
942 | */ | 962 | */ |
943 | static int tty3215_open(struct tty_struct *tty, struct file * filp) | 963 | static int tty3215_open(struct tty_struct *tty, struct file * filp) |
944 | { | 964 | { |
945 | struct raw3215_info *raw; | 965 | struct raw3215_info *raw = tty->driver_data; |
946 | int retval; | 966 | int retval; |
947 | 967 | ||
948 | raw = raw3215[tty->index]; | ||
949 | if (raw == NULL) | ||
950 | return -ENODEV; | ||
951 | |||
952 | tty->driver_data = raw; | ||
953 | tty_port_tty_set(&raw->port, tty); | 968 | tty_port_tty_set(&raw->port, tty); |
954 | 969 | ||
955 | tty->low_latency = 0; /* don't use bottom half for pushing chars */ | 970 | tty->low_latency = 0; /* don't use bottom half for pushing chars */ |
@@ -1110,6 +1125,7 @@ static void tty3215_start(struct tty_struct *tty) | |||
1110 | } | 1125 | } |
1111 | 1126 | ||
1112 | static const struct tty_operations tty3215_ops = { | 1127 | static const struct tty_operations tty3215_ops = { |
1128 | .install = tty3215_install, | ||
1113 | .open = tty3215_open, | 1129 | .open = tty3215_open, |
1114 | .close = tty3215_close, | 1130 | .close = tty3215_close, |
1115 | .write = tty3215_write, | 1131 | .write = tty3215_write, |