> As per my understanding, tty count keeps the count of tty_open and tty_release, that is > how many open and close happened on the tty device file(/dev/ttyS*). > The requirement here is a tty count check, if it is greater than zero then only it should > proceed for further execution. The physical port has a different lifetime to the struct tty_struct (which may change many times within the lifetime of the port). You can't simply go from the port to a tty struct and assume this is safe and will not change. > Kindly elaborate more on the same if it's not correct. Look at how tty_port_tty_get is used -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html