mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
USB: serial: clean up carrier-detect helper
Drop the struct tty_port pointer and rename the struct usb_serial_port pointer "port", which is the named used throughout the subsystem and incidentally also matches the kernel-doc comment. Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
parent
0a68ec3d8a
commit
5e95dbb621
@ -609,12 +609,10 @@ EXPORT_SYMBOL_GPL(usb_serial_handle_break);
|
|||||||
* @tty: tty for the port
|
* @tty: tty for the port
|
||||||
* @status: new carrier detect status, nonzero if active
|
* @status: new carrier detect status, nonzero if active
|
||||||
*/
|
*/
|
||||||
void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port,
|
void usb_serial_handle_dcd_change(struct usb_serial_port *port,
|
||||||
struct tty_struct *tty, unsigned int status)
|
struct tty_struct *tty, unsigned int status)
|
||||||
{
|
{
|
||||||
struct tty_port *port = &usb_port->port;
|
dev_dbg(&port->dev, "%s - status %d\n", __func__, status);
|
||||||
|
|
||||||
dev_dbg(&usb_port->dev, "%s - status %d\n", __func__, status);
|
|
||||||
|
|
||||||
if (tty) {
|
if (tty) {
|
||||||
struct tty_ldisc *ld = tty_ldisc_ref(tty);
|
struct tty_ldisc *ld = tty_ldisc_ref(tty);
|
||||||
@ -627,7 +625,7 @@ void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (status)
|
if (status)
|
||||||
wake_up_interruptible(&port->open_wait);
|
wake_up_interruptible(&port->port.open_wait);
|
||||||
else if (tty && !C_CLOCAL(tty))
|
else if (tty && !C_CLOCAL(tty))
|
||||||
tty_hangup(tty);
|
tty_hangup(tty);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user