generic.c (f43dc23d5ea91fca257be02138a255f02d98e806) generic.c (d14fc1a74e846d7851f24fc9519fe87dc12a1231)
1/*
2 * USB Serial Converter Generic functions
3 *
4 * Copyright (C) 2010 Johan Hovold (jhovold@gmail.com)
5 * Copyright (C) 1999 - 2002 Greg Kroah-Hartman (greg@kroah.com)
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License version

--- 465 unchanged lines hidden (view full) ---

474 port->sysrq = jiffies + HZ*5;
475 return 1;
476 }
477 port->sysrq = 0;
478 return 0;
479}
480EXPORT_SYMBOL_GPL(usb_serial_handle_break);
481
1/*
2 * USB Serial Converter Generic functions
3 *
4 * Copyright (C) 2010 Johan Hovold (jhovold@gmail.com)
5 * Copyright (C) 1999 - 2002 Greg Kroah-Hartman (greg@kroah.com)
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License version

--- 465 unchanged lines hidden (view full) ---

474 port->sysrq = jiffies + HZ*5;
475 return 1;
476 }
477 port->sysrq = 0;
478 return 0;
479}
480EXPORT_SYMBOL_GPL(usb_serial_handle_break);
481
482/**
483 * usb_serial_handle_dcd_change - handle a change of carrier detect state
484 * @port: usb_serial_port structure for the open port
485 * @tty: tty_struct structure for the port
486 * @status: new carrier detect status, nonzero if active
487 */
488void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port,
489 struct tty_struct *tty, unsigned int status)
490{
491 struct tty_port *port = &usb_port->port;
492
493 dbg("%s - port %d, status %d", __func__, usb_port->number, status);
494
495 if (status)
496 wake_up_interruptible(&port->open_wait);
497 else if (tty && !C_CLOCAL(tty))
498 tty_hangup(tty);
499}
500EXPORT_SYMBOL_GPL(usb_serial_handle_dcd_change);
501
482int usb_serial_generic_resume(struct usb_serial *serial)
483{
484 struct usb_serial_port *port;
485 int i, c = 0, r;
486
487 for (i = 0; i < serial->num_ports; i++) {
488 port = serial->port[i];
489 if (!test_bit(ASYNCB_INITIALIZED, &port->port.flags))

--- 35 unchanged lines hidden ---
502int usb_serial_generic_resume(struct usb_serial *serial)
503{
504 struct usb_serial_port *port;
505 int i, c = 0, r;
506
507 for (i = 0; i < serial->num_ports; i++) {
508 port = serial->port[i];
509 if (!test_bit(ASYNCB_INITIALIZED, &port->port.flags))

--- 35 unchanged lines hidden ---