coco3: devtty: bugfix: tty_close not closing port at dw level.
authorBrett Gordon <beretta42@gmail.com>
Thu, 26 Nov 2015 18:45:35 +0000 (13:45 -0500)
committerBrett Gordon <beretta42@gmail.com>
Sun, 29 Nov 2015 15:29:11 +0000 (10:29 -0500)
Kernel/platform-coco3/devtty.c

index 0322110..84d5553 100644 (file)
@@ -203,7 +203,7 @@ void apply_gime( int minor ){
 /* A wrapper for tty_close that closes the DW port properly */
 int my_tty_close(uint8_t minor)
 {
-       if (minor > 2 && ttydata[minor].users == 0)
+       if (minor > 2 && ttydata[minor].users == 1)
                dw_vclose(minor);
        return (tty_close(minor));
 }