Following are 2 patches to fix a TTY regression. The first patch is scaffolding which allows the second patch to be a clean cherry-pick. [PATCH 1/2 Trusty SRU v2] n_tty: Refactor input_available_p() by call site [PATCH 2/2 Trusty SRU v2] tty: Fix pty master poll() after slave closes v2