diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index a540849..ac41af8 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -1204,53 +1204,38 @@
 	sprintf(p, "%s%d", driver->name, index + driver->name_base);
 }
 
-/*
- * 	find_tty() - find an existing tty, if any
- * 	@driver: the driver for the tty
- * 	@idx:	 the minor number
+/**
+ *	tty_driver_lookup_tty() - find an existing tty, if any
+ *	@driver: the driver for the tty
+ *	@idx:	 the minor number
  *
- * 	Return the tty, if found or ERR_PTR() otherwise.
+ *	Return the tty, if found or ERR_PTR() otherwise.
  *
- * 	Locking: tty_mutex must be held. If tty is found, the mutex must
- * 		 be held until the 'fast-open' is also done.
+ *	Locking: tty_mutex must be held. If tty is found, the mutex must
+ *	be held until the 'fast-open' is also done. Will change once we
+ *	have refcounting in the driver and per driver locking
  */
-struct tty_struct *find_tty(struct tty_driver *driver, int idx)
+struct tty_struct *tty_driver_lookup_tty(struct tty_driver *driver, int idx)
 {
 	struct tty_struct *tty;
 
-	/* check whether we're reopening an existing tty */
-	if (driver->flags & TTY_DRIVER_DEVPTS_MEM) {
-		tty = devpts_get_tty(idx);
-		/*
-		 * If we don't have a tty here on a slave open, it's because
-		 * the master already started the close process and there's
-		 * no relation between devpts file and tty anymore.
-		 */
-		if (!tty && driver->subtype == PTY_TYPE_SLAVE)
-			return ERR_PTR(-EIO);
+	if (driver->ops->lookup)
+		return driver->ops->lookup(driver, idx);
 
-		/*
-		 * tty is safe on because we are called with tty_mutex held
-		 * and release_dev() won't change tty->count or tty->flags
-		 * without grabbing tty_mutex.
-		 */
-		if (tty && driver->subtype == PTY_TYPE_MASTER)
-			tty = tty->link;
-	} else
 		tty = driver->ttys[idx];
 	return tty;
 }
 
-/*
- * 	fast_tty_open()	- fast re-open of an open tty
- * 	@tty	- the tty to open
+/**
+ *	tty_reopen()	- fast re-open of an open tty
+ *	@tty	- the tty to open
  *
- * 	Return 0 on success, -errno on error.
+ *	Return 0 on success, -errno on error.
  *
- * 	Locking: tty_mutex must be held from the time the tty was found
- * 		 till this open completes.
+ *	Locking: tty_mutex must be held from the time the tty was found
+ *		 till this open completes.
  */
-static int fast_tty_open(struct tty_struct *tty)
+static int tty_reopen(struct tty_struct *tty)
 {
 	struct tty_driver *driver = tty->driver;
 
@@ -1271,9 +1256,7 @@
 	tty->count++;
 	tty->driver = driver; /* N.B. why do this every time?? */
 
-	/* FIXME */
-	if (!test_bit(TTY_LDISC, &tty->flags))
-		printk(KERN_ERR "fast_tty_open: no ldisc\n");
+	WARN_ON(!test_bit(TTY_LDISC, &tty->flags));
 
 	return 0;
 }
@@ -1312,14 +1295,14 @@
 	int retval = 0;
 
 	/* check whether we're reopening an existing tty */
-	tty = find_tty(driver, idx);
+	tty = tty_driver_lookup_tty(driver, idx);
 	if (IS_ERR(tty)) {
 		retval = PTR_ERR(tty);
 		goto end_init;
 	}
 
 	if (tty) {
-		retval = fast_tty_open(tty);
+		retval = tty_reopen(tty);
 		if (retval)
 			return retval;
 		*ret_tty = tty;
@@ -1440,6 +1423,8 @@
 	 * All structures have been allocated, so now we install them.
 	 * Failures after this point use release_tty to clean up, so
 	 * there's no need to null out the local pointers.
+	 *
+	 * FIXME: We want a 'driver->install method ?
 	 */
 	if (!(driver->flags & TTY_DRIVER_DEVPTS_MEM))
 		driver->ttys[idx] = tty;
@@ -1466,9 +1451,8 @@
 
 	if (retval)
 		goto release_mem_out;
-success:
-	*ret_tty = tty;
 
+	*ret_tty = tty;
 	/* All paths come through here to release the mutex */
 end_init:
 	return retval;
