.. | .. |
---|
280 | 280 | * Return a refcount protected tty instance or NULL if the port is not |
---|
281 | 281 | * associated with a tty (eg due to close or hangup) |
---|
282 | 282 | */ |
---|
283 | | - |
---|
284 | 283 | struct tty_struct *tty_port_tty_get(struct tty_port *port) |
---|
285 | 284 | { |
---|
286 | 285 | unsigned long flags; |
---|
.. | .. |
---|
301 | 300 | * Associate the port and tty pair. Manages any internal refcounts. |
---|
302 | 301 | * Pass NULL to deassociate a port |
---|
303 | 302 | */ |
---|
304 | | - |
---|
305 | 303 | void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty) |
---|
306 | 304 | { |
---|
307 | 305 | unsigned long flags; |
---|
.. | .. |
---|
344 | 342 | * |
---|
345 | 343 | * Caller holds tty lock. |
---|
346 | 344 | */ |
---|
347 | | - |
---|
348 | 345 | void tty_port_hangup(struct tty_port *port) |
---|
349 | 346 | { |
---|
350 | 347 | struct tty_struct *tty; |
---|
.. | .. |
---|
400 | 397 | * to hide some internal details. This will eventually become entirely |
---|
401 | 398 | * internal to the tty port. |
---|
402 | 399 | */ |
---|
403 | | - |
---|
404 | 400 | int tty_port_carrier_raised(struct tty_port *port) |
---|
405 | 401 | { |
---|
406 | 402 | if (port->ops->carrier_raised == NULL) |
---|
.. | .. |
---|
417 | 413 | * to hide some internal details. This will eventually become entirely |
---|
418 | 414 | * internal to the tty port. |
---|
419 | 415 | */ |
---|
420 | | - |
---|
421 | 416 | void tty_port_raise_dtr_rts(struct tty_port *port) |
---|
422 | 417 | { |
---|
423 | 418 | if (port->ops->dtr_rts) |
---|
.. | .. |
---|
433 | 428 | * to hide some internal details. This will eventually become entirely |
---|
434 | 429 | * internal to the tty port. |
---|
435 | 430 | */ |
---|
436 | | - |
---|
437 | 431 | void tty_port_lower_dtr_rts(struct tty_port *port) |
---|
438 | 432 | { |
---|
439 | 433 | if (port->ops->dtr_rts) |
---|
.. | .. |
---|
465 | 459 | * NB: May drop and reacquire tty lock when blocking, so tty and tty_port |
---|
466 | 460 | * may have changed state (eg., may have been hung up). |
---|
467 | 461 | */ |
---|
468 | | - |
---|
469 | 462 | int tty_port_block_til_ready(struct tty_port *port, |
---|
470 | 463 | struct tty_struct *tty, struct file *filp) |
---|
471 | 464 | { |
---|