]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/tty/tty_io.c
drm/i915/execlists: Refactor -EIO markup of hung requests
[linux.git] / drivers / tty / tty_io.c
index 566728fbaf3cd4717af9da3380c389592f67ab61..802c1210558f20719804c531a0247eb24a427767 100644 (file)
@@ -2952,17 +2952,11 @@ void do_SAK(struct tty_struct *tty)
 
 EXPORT_SYMBOL(do_SAK);
 
-static int dev_match_devt(struct device *dev, const void *data)
-{
-       const dev_t *devt = data;
-       return dev->devt == *devt;
-}
-
 /* Must put_device() after it's unused! */
 static struct device *tty_get_device(struct tty_struct *tty)
 {
        dev_t devt = tty_devnum(tty);
-       return class_find_device(tty_class, NULL, &devt, dev_match_devt);
+       return class_find_device_by_devt(tty_class, devt);
 }