Thread (79 messages) 79 messages, 7 authors, 2012-03-18
STALE5187d

[PATCH 01/68] USB: cdc-acm, use tty_standard_install

From: Jiri Slaby <hidden>
Date: 2012-03-05 13:53:11
Also in: lkml
Subsystem: the rest, usb acm driver, usb subsystem · Maintainers: Linus Torvalds, Oliver Neukum, Greg Kroah-Hartman

This is a piece I missed the last time.

Do not copy the functionality all over the tree. Instead, use the
helper the tty layer provides us with.

Signed-off-by: Jiri Slaby <redacted>
---
 drivers/usb/class/cdc-acm.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 6dcc3a3..b3fd449 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -509,17 +509,12 @@ static int acm_tty_install(struct tty_driver *driver, struct tty_struct *tty)
 	if (!acm)
 		return -ENODEV;
 
-	retval = tty_init_termios(tty);
+	retval = tty_standard_install(driver, tty);
 	if (retval)
 		goto error_init_termios;
 
 	tty->driver_data = acm;
 
-	/* Final install (we use the default method) */
-	tty_driver_kref_get(driver);
-	tty->count++;
-	driver->ttys[tty->index] = tty;
-
 	return 0;
 
 error_init_termios:
-- 
1.7.9.2

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help