Skip to contentSkip to conversation

tty: Remove unused drop() method from tty_port interface

PATCH New Peter Hurley 1 participant 1 message Sep 19, 2013 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tty: Remove unused drop() method from tty_port interface

Although originally conceived as a hook for port drivers to know when a port reference is dropped, no driver uses this method.

---
 drivers/tty/tty_port.c | 6 +-----
 include/linux/tty.h    | 1 -
 2 files changed, 1 insertion(+), 6 deletions(-)
drivers/tty/tty_port.c +1 -5
index f597e88..9857f7e 100644
@@ -480,8 +480,6 @@ int tty_port_close_start(struct tty_port *port,
 
 	if (port->count) {
 		spin_unlock_irqrestore(&port->lock, flags);
-		if (port->ops->drop)
-			port->ops->drop(port);
 		return 0;
 	}
 	set_bit(ASYNCB_CLOSING, &port->flags);
@@ -500,9 +498,7 @@ int tty_port_close_start(struct tty_port *port,
 	/* Flush the ldisc buffering */
 	tty_ldisc_flush(tty);
 
-	/* Don't call port->drop for the last reference. Callers will want
-	   to drop the last active reference in ->shutdown() or the tty
-	   shutdown path */
+	/* Report to caller this is the last port reference */
 	return 1;
 }
 EXPORT_SYMBOL(tty_port_close_start);
include/linux/tty.h +0 -1
index 64f8646..2f47989 100644
@@ -180,7 +180,6 @@ struct tty_port_operations {
 	   IFF the port was initialized. Do not use to free resources. Called
 	   under the port mutex to serialize against activate/shutdowns */
 	void (*shutdown)(struct tty_port *port);
-	void (*drop)(struct tty_port *port);
 	/* Called under the port mutex from tty_port_open, serialized using
 	   the port mutex */
         /* FIXME: long term getting the tty argument *out* of this would be
Signature · 1 line
1.8.1.2