tty: Replace open-coded test with tty_hung_up_p()