diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 9c7e1d563e56..3873660d8217 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -358,10 +358,6 @@ static int serial_write(struct tty_struct *tty, const unsigned char *buf, | |||
358 | 358 | ||
359 | dbg("%s - port %d, %d byte(s)", __func__, port->number, count); | 359 | dbg("%s - port %d, %d byte(s)", __func__, port->number, count); |
360 | 360 | ||
361 | /* count is managed under the mutex lock for the tty so cannot | ||
362 | drop to zero until after the last close completes */ | ||
363 | WARN_ON(!port->port.count); | ||
364 | |||
365 | /* pass on to the driver specific version of this function */ | 361 | /* pass on to the driver specific version of this function */ |
366 | retval = port->serial->type->write(tty, port, buf, count); | 362 | retval = port->serial->type->write(tty, port, buf, count); |
367 | 363 | ||
@@ -373,7 +369,6 @@ static int serial_write_room(struct tty_struct *tty) | |||
373 | { | 369 | { |
374 | struct usb_serial_port *port = tty->driver_data; | 370 | struct usb_serial_port *port = tty->driver_data; |
375 | dbg("%s - port %d", __func__, port->number); | 371 | dbg("%s - port %d", __func__, port->number); |
376 | WARN_ON(!port->port.count); | ||
377 | /* pass on to the driver specific version of this function */ | 372 | /* pass on to the driver specific version of this function */ |
378 | return port->serial->type->write_room(tty); | 373 | return port->serial->type->write_room(tty); |
379 | } | 374 | } |
@@ -396,7 +391,6 @@ static void serial_throttle(struct tty_struct *tty) | |||
396 | struct usb_serial_port *port = tty->driver_data; | 391 | struct usb_serial_port *port = tty->driver_data; |
397 | dbg("%s - port %d", __func__, port->number); | 392 | dbg("%s - port %d", __func__, port->number); |
398 | 393 | ||
399 | WARN_ON(!port->port.count); | ||
400 | /* pass on to the driver specific version of this function */ | 394 | /* pass on to the driver specific version of this function */ |
401 | if (port->serial->type->throttle) | 395 | if (port->serial->type->throttle) |
402 | port->serial->type->throttle(tty); | 396 | port->serial->type->throttle(tty); |
@@ -407,7 +401,6 @@ static void serial_unthrottle(struct tty_struct *tty) | |||
407 | struct usb_serial_port *port = tty->driver_data; | 401 | struct usb_serial_port *port = tty->driver_data; |
408 | dbg("%s - port %d", __func__, port->number); | 402 | dbg("%s - port %d", __func__, port->number); |
409 | 403 | ||
410 | WARN_ON(!port->port.count); | ||
411 | /* pass on to the driver specific version of this function */ | 404 | /* pass on to the driver specific version of this function */ |
412 | if (port->serial->type->unthrottle) | 405 | if (port->serial->type->unthrottle) |
413 | port->serial->type->unthrottle(tty); | 406 | port->serial->type->unthrottle(tty); |
@@ -421,8 +414,6 @@ static int serial_ioctl(struct tty_struct *tty, struct file *file, | |||
421 | 414 | ||
422 | dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd); | 415 | dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd); |
423 | 416 | ||
424 | WARN_ON(!port->port.count); | ||
425 | |||
426 | /* pass on to the driver specific version of this function | 417 | /* pass on to the driver specific version of this function |
427 | if it is available */ | 418 | if it is available */ |
428 | if (port->serial->type->ioctl) { | 419 | if (port->serial->type->ioctl) { |
@@ -437,7 +428,6 @@ static void serial_set_termios(struct tty_struct *tty, struct ktermios *old) | |||
437 | struct usb_serial_port *port = tty->driver_data; | 428 | struct usb_serial_port *port = tty->driver_data; |
438 | dbg("%s - port %d", __func__, port->number); | 429 | dbg("%s - port %d", __func__, port->number); |
439 | 430 | ||
440 | WARN_ON(!port->port.count); | ||
441 | /* pass on to the driver specific version of this function | 431 | /* pass on to the driver specific version of this function |
442 | if it is available */ | 432 | if it is available */ |
443 | if (port->serial->type->set_termios) | 433 | if (port->serial->type->set_termios) |
@@ -452,7 +442,6 @@ static int serial_break(struct tty_struct *tty, int break_state) | |||
452 | 442 | ||
453 | dbg("%s - port %d", __func__, port->number); | 443 | dbg("%s - port %d", __func__, port->number); |
454 | 444 | ||
455 | WARN_ON(!port->port.count); | ||
456 | /* pass on to the driver specific version of this function | 445 | /* pass on to the driver specific version of this function |
457 | if it is available */ | 446 | if it is available */ |
458 | if (port->serial->type->break_ctl) | 447 | if (port->serial->type->break_ctl) |
@@ -513,7 +502,6 @@ static int serial_tiocmget(struct tty_struct *tty, struct file *file) | |||
513 | 502 | ||
514 | dbg("%s - port %d", __func__, port->number); | 503 | dbg("%s - port %d", __func__, port->number); |
515 | 504 | ||
516 | WARN_ON(!port->port.count); | ||
517 | if (port->serial->type->tiocmget) | 505 | if (port->serial->type->tiocmget) |
518 | return port->serial->type->tiocmget(tty, file); | 506 | return port->serial->type->tiocmget(tty, file); |
519 | return -EINVAL; | 507 | return -EINVAL; |
@@ -526,7 +514,6 @@ static int serial_tiocmset(struct tty_struct *tty, struct file *file, | |||
526 | 514 | ||
527 | dbg("%s - port %d", __func__, port->number); | 515 | dbg("%s - port %d", __func__, port->number); |
528 | 516 | ||
529 | WARN_ON(!port->port.count); | ||
530 | if (port->serial->type->tiocmset) | 517 | if (port->serial->type->tiocmset) |
531 | return port->serial->type->tiocmset(tty, file, set, clear); | 518 | return port->serial->type->tiocmset(tty, file, set, clear); |
532 | return -EINVAL; | 519 | return -EINVAL; |