Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752601AbdFNNdL (ORCPT ); Wed, 14 Jun 2017 09:33:11 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:36450 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752418AbdFNNdK (ORCPT ); Wed, 14 Jun 2017 09:33:10 -0400 Date: Wed, 14 Jun 2017 14:33:00 +0100 From: Alan Cox To: Tal Shorer Cc: linux-doc@vger.kernel.org, "" , USB list , "" , Felipe Balbi , Jonathan Corbet Subject: Re: [PATCH v2 1/8] tty: add a poll() callback in struct tty_operations Message-ID: <20170614143300.5f2ebe4c@alans-desktop> In-Reply-To: References: <1497336734-19368-1-git-send-email-tal.shorer@gmail.com> <1497336734-19368-2-git-send-email-tal.shorer@gmail.com> <20170614021505.5a915c2b@alans-desktop> Organization: Intel Corporation X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 634 Lines: 13 > That would cut it, but TIOCPKT is too coupled with having a linked tty. > I could make acm behave like a pty (accept TIOCPKT and issue the > ctrl_status bits), but for that I need n_tty to know that packet does > not always mean a linked tty is present, and that in case it isn't we > take our own ctrl_status bits instead of the link's. I could write a > small (inline?) function to fetch the correct ctrl_status bits and put > that in n_tty. Does that make sense? I think that makes sense, and I would do the job properly rather than do a hack with tty->link. Those hacks in the long term never work out the best approach. Alan