diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-09-12 18:32:47 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-10-13 00:50:47 -0400 |
commit | b413f00ab1a99ccb239fc5afd4b8e0c7ada6c9db (patch) | |
tree | 130462eeb245f8a22909a3a3020e1eb534c65983 | |
parent | 6bbf265892241f540d3465c074c04a39b7f127ec (diff) |
dgnc: break-related ioctls won't reach ->ioctl()
kill the dead code, especially since ->break_ctl() will do the
right thing anyway.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | drivers/staging/dgnc/dgnc_tty.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index 9accaa705820..040af55e9e68 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c | |||
@@ -2081,81 +2081,6 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, | |||
2081 | 2081 | ||
2082 | switch (cmd) { | 2082 | switch (cmd) { |
2083 | /* Here are all the standard ioctl's that we MUST implement */ | 2083 | /* Here are all the standard ioctl's that we MUST implement */ |
2084 | |||
2085 | case TCSBRK: | ||
2086 | /* | ||
2087 | * TCSBRK is SVID version: non-zero arg --> no break | ||
2088 | * this behaviour is exploited by tcdrain(). | ||
2089 | * | ||
2090 | * According to POSIX.1 spec (7.2.2.1.2) breaks should be | ||
2091 | * between 0.25 and 0.5 seconds so we'll ask for something | ||
2092 | * in the middle: 0.375 seconds. | ||
2093 | */ | ||
2094 | rc = tty_check_change(tty); | ||
2095 | spin_unlock_irqrestore(&ch->ch_lock, flags); | ||
2096 | if (rc) | ||
2097 | return rc; | ||
2098 | |||
2099 | rc = ch_bd_ops->drain(tty, 0); | ||
2100 | if (rc) | ||
2101 | return -EINTR; | ||
2102 | |||
2103 | spin_lock_irqsave(&ch->ch_lock, flags); | ||
2104 | |||
2105 | if (((cmd == TCSBRK) && (!arg)) || (cmd == TCSBRKP)) | ||
2106 | ch_bd_ops->send_break(ch, 250); | ||
2107 | |||
2108 | spin_unlock_irqrestore(&ch->ch_lock, flags); | ||
2109 | |||
2110 | return 0; | ||
2111 | |||
2112 | case TCSBRKP: | ||
2113 | /* | ||
2114 | * support for POSIX tcsendbreak() | ||
2115 | * According to POSIX.1 spec (7.2.2.1.2) breaks should be | ||
2116 | * between 0.25 and 0.5 seconds so we'll ask for something | ||
2117 | * in the middle: 0.375 seconds. | ||
2118 | */ | ||
2119 | rc = tty_check_change(tty); | ||
2120 | spin_unlock_irqrestore(&ch->ch_lock, flags); | ||
2121 | if (rc) | ||
2122 | return rc; | ||
2123 | |||
2124 | rc = ch_bd_ops->drain(tty, 0); | ||
2125 | if (rc) | ||
2126 | return -EINTR; | ||
2127 | |||
2128 | spin_lock_irqsave(&ch->ch_lock, flags); | ||
2129 | |||
2130 | ch_bd_ops->send_break(ch, 250); | ||
2131 | |||
2132 | spin_unlock_irqrestore(&ch->ch_lock, flags); | ||
2133 | |||
2134 | return 0; | ||
2135 | |||
2136 | case TIOCSBRK: | ||
2137 | rc = tty_check_change(tty); | ||
2138 | spin_unlock_irqrestore(&ch->ch_lock, flags); | ||
2139 | if (rc) | ||
2140 | return rc; | ||
2141 | |||
2142 | rc = ch_bd_ops->drain(tty, 0); | ||
2143 | if (rc) | ||
2144 | return -EINTR; | ||
2145 | |||
2146 | spin_lock_irqsave(&ch->ch_lock, flags); | ||
2147 | |||
2148 | ch_bd_ops->send_break(ch, 250); | ||
2149 | |||
2150 | spin_unlock_irqrestore(&ch->ch_lock, flags); | ||
2151 | |||
2152 | return 0; | ||
2153 | |||
2154 | case TIOCCBRK: | ||
2155 | /* Do Nothing */ | ||
2156 | spin_unlock_irqrestore(&ch->ch_lock, flags); | ||
2157 | return 0; | ||
2158 | |||
2159 | case TIOCGSOFTCAR: | 2084 | case TIOCGSOFTCAR: |
2160 | 2085 | ||
2161 | spin_unlock_irqrestore(&ch->ch_lock, flags); | 2086 | spin_unlock_irqrestore(&ch->ch_lock, flags); |