All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] USB: serial: clean up some kernel doc
@ 2020-02-25 10:24 Johan Hovold
  2020-02-25 10:24 ` [PATCH 1/2] USB: serial: clean up carrier-detect helper Johan Hovold
  2020-02-25 10:24 ` [PATCH 2/2] USB: serial: fix tty cleanup op kernel-doc Johan Hovold
  0 siblings, 2 replies; 4+ messages in thread
From: Johan Hovold @ 2020-02-25 10:24 UTC (permalink / raw)
  To: Johan Hovold; +Cc: linux-usb

Fix up a couple of kernel doc comments that used the wrong parameter
names.

Johan


Johan Hovold (2):
  USB: serial: clean up carrier-detect helper
  USB: serial: fix tty cleanup op kernel-doc

 drivers/usb/serial/generic.c    | 8 +++-----
 drivers/usb/serial/usb-serial.c | 2 +-
 2 files changed, 4 insertions(+), 6 deletions(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] USB: serial: clean up carrier-detect helper
  2020-02-25 10:24 [PATCH 0/2] USB: serial: clean up some kernel doc Johan Hovold
@ 2020-02-25 10:24 ` Johan Hovold
  2020-02-25 10:24 ` [PATCH 2/2] USB: serial: fix tty cleanup op kernel-doc Johan Hovold
  1 sibling, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2020-02-25 10:24 UTC (permalink / raw)
  To: Johan Hovold; +Cc: linux-usb

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>
---
 drivers/usb/serial/generic.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 546a1c2ce2f2..5cdf180cda23 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -609,12 +609,10 @@ EXPORT_SYMBOL_GPL(usb_serial_handle_break);
  * @tty: tty for the port
  * @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_port *port = &usb_port->port;
-
-	dev_dbg(&usb_port->dev, "%s - status %d\n", __func__, status);
+	dev_dbg(&port->dev, "%s - status %d\n", __func__, status);
 
 	if (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)
-		wake_up_interruptible(&port->open_wait);
+		wake_up_interruptible(&port->port.open_wait);
 	else if (tty && !C_CLOCAL(tty))
 		tty_hangup(tty);
 }
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] USB: serial: fix tty cleanup op kernel-doc
  2020-02-25 10:24 [PATCH 0/2] USB: serial: clean up some kernel doc Johan Hovold
  2020-02-25 10:24 ` [PATCH 1/2] USB: serial: clean up carrier-detect helper Johan Hovold
@ 2020-02-25 10:24 ` Johan Hovold
  2020-02-25 10:27   ` Johan Hovold
  1 sibling, 1 reply; 4+ messages in thread
From: Johan Hovold @ 2020-02-25 10:24 UTC (permalink / raw)
  To: Johan Hovold; +Cc: linux-usb

The tty cleanup operation is called with a struct tty as it's sole
parameter.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/usb/serial/usb-serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index dc7a65b9ec98..27e3bb58c872 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -288,7 +288,7 @@ static void serial_close(struct tty_struct *tty, struct file *filp)
 
 /**
  * serial_cleanup - free resources post close/hangup
- * @port: port to free up
+ * @tty: tty to clean up
  *
  * Do the resource freeing and refcount dropping for the port.
  * Avoid freeing the console.
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] USB: serial: fix tty cleanup op kernel-doc
  2020-02-25 10:24 ` [PATCH 2/2] USB: serial: fix tty cleanup op kernel-doc Johan Hovold
@ 2020-02-25 10:27   ` Johan Hovold
  0 siblings, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2020-02-25 10:27 UTC (permalink / raw)
  To: Johan Hovold; +Cc: linux-usb

On Tue, Feb 25, 2020 at 11:24:21AM +0100, Johan Hovold wrote:
> The tty cleanup operation is called with a struct tty as it's sole

I'll fix the 'its' typo when applying...

> parameter.

Johan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-25 10:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-25 10:24 [PATCH 0/2] USB: serial: clean up some kernel doc Johan Hovold
2020-02-25 10:24 ` [PATCH 1/2] USB: serial: clean up carrier-detect helper Johan Hovold
2020-02-25 10:24 ` [PATCH 2/2] USB: serial: fix tty cleanup op kernel-doc Johan Hovold
2020-02-25 10:27   ` Johan Hovold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.