Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+3 -5
+3 -5
drivers/usb/serial/generic.c
··· 609 609 * @tty: tty for the port 610 610 * @status: new carrier detect status, nonzero if active 611 611 */ 612 - void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port, 612 + void usb_serial_handle_dcd_change(struct usb_serial_port *port, 613 613 struct tty_struct *tty, unsigned int status) 614 614 { 615 - struct tty_port *port = &usb_port->port; 616 - 617 - dev_dbg(&usb_port->dev, "%s - status %d\n", __func__, status); 615 + dev_dbg(&port->dev, "%s - status %d\n", __func__, status); 618 616 619 617 if (tty) { 620 618 struct tty_ldisc *ld = tty_ldisc_ref(tty); ··· 625 627 } 626 628 627 629 if (status) 628 - wake_up_interruptible(&port->open_wait); 630 + wake_up_interruptible(&port->port.open_wait); 629 631 else if (tty && !C_CLOCAL(tty)) 630 632 tty_hangup(tty); 631 633 }