diff options
-rw-r--r-- | drivers/char/epca.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/char/epca.c b/drivers/char/epca.c index ffd747c5dff0..9a682851283e 100644 --- a/drivers/char/epca.c +++ b/drivers/char/epca.c | |||
@@ -2206,21 +2206,6 @@ static int pc_ioctl(struct tty_struct *tty, struct file * file, | |||
2206 | tty_wait_until_sent(tty, 0); | 2206 | tty_wait_until_sent(tty, 0); |
2207 | digi_send_break(ch, arg ? arg*(HZ/10) : HZ/4); | 2207 | digi_send_break(ch, arg ? arg*(HZ/10) : HZ/4); |
2208 | return 0; | 2208 | return 0; |
2209 | case TIOCGSOFTCAR: | ||
2210 | if (put_user(C_CLOCAL(tty)?1:0, (unsigned long __user *)arg)) | ||
2211 | return -EFAULT; | ||
2212 | return 0; | ||
2213 | case TIOCSSOFTCAR: | ||
2214 | { | ||
2215 | unsigned int value; | ||
2216 | |||
2217 | if (get_user(value, (unsigned __user *)argp)) | ||
2218 | return -EFAULT; | ||
2219 | tty->termios->c_cflag = | ||
2220 | ((tty->termios->c_cflag & ~CLOCAL) | | ||
2221 | (value ? CLOCAL : 0)); | ||
2222 | return 0; | ||
2223 | } | ||
2224 | case TIOCMODG: | 2209 | case TIOCMODG: |
2225 | mflag = pc_tiocmget(tty, file); | 2210 | mflag = pc_tiocmget(tty, file); |
2226 | if (put_user(mflag, (unsigned long __user *)argp)) | 2211 | if (put_user(mflag, (unsigned long __user *)argp)) |
@@ -2253,6 +2238,7 @@ static int pc_ioctl(struct tty_struct *tty, struct file * file, | |||
2253 | break; | 2238 | break; |
2254 | case DIGI_SETAW: | 2239 | case DIGI_SETAW: |
2255 | case DIGI_SETAF: | 2240 | case DIGI_SETAF: |
2241 | lock_kernel(); | ||
2256 | if (cmd == DIGI_SETAW) { | 2242 | if (cmd == DIGI_SETAW) { |
2257 | /* Setup an event to indicate when the transmit buffer empties */ | 2243 | /* Setup an event to indicate when the transmit buffer empties */ |
2258 | spin_lock_irqsave(&epca_lock, flags); | 2244 | spin_lock_irqsave(&epca_lock, flags); |
@@ -2264,6 +2250,7 @@ static int pc_ioctl(struct tty_struct *tty, struct file * file, | |||
2264 | if (tty->ldisc.flush_buffer) | 2250 | if (tty->ldisc.flush_buffer) |
2265 | tty->ldisc.flush_buffer(tty); | 2251 | tty->ldisc.flush_buffer(tty); |
2266 | } | 2252 | } |
2253 | unlock_kernel(); | ||
2267 | /* Fall Thru */ | 2254 | /* Fall Thru */ |
2268 | case DIGI_SETA: | 2255 | case DIGI_SETA: |
2269 | if (copy_from_user(&ch->digiext, argp, sizeof(digi_t))) | 2256 | if (copy_from_user(&ch->digiext, argp, sizeof(digi_t))) |