Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752327AbdGIM2g (ORCPT ); Sun, 9 Jul 2017 08:28:36 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:35649 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752158AbdGIM2f (ORCPT ); Sun, 9 Jul 2017 08:28:35 -0400 Date: Sun, 9 Jul 2017 13:28:30 +0100 From: Okash Khawaja To: Greg Kroah-Hartman Cc: Jiri Slaby , Samuel Thibault , Alan Cox , linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, Kirk Reiser , speakup@linux-speakup.org, Chris Brannon Subject: Re: [patch 2/3] staging: speakup: use tty_kopen instead of tty_open_by_driver Message-ID: <20170709122830.GA10914@sanghar> References: <20170708083803.GA23080@kroah.com> <20170709114153.157783481@gmail.com> <20170709114429.230337437@gmail.com> <20170709115055.GA14769@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170709115055.GA14769@kroah.com> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 906 Lines: 26 On Sun, Jul 09, 2017 at 01:50:55PM +0200, Greg Kroah-Hartman wrote: > On Sun, Jul 09, 2017 at 12:41:55PM +0100, Okash Khawaja wrote: > > This patch replaces call to tty_open_by_driver with a tty_kopen. > > > > Signed-off-by: Okash Khawaja > > > > --- > > drivers/staging/speakup/spk_ttyio.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > --- a/drivers/staging/speakup/spk_ttyio.c > > +++ b/drivers/staging/speakup/spk_ttyio.c > > @@ -164,7 +164,7 @@ static int spk_ttyio_initialise_ldisc(st > > if (ret) > > return ret; > > > > - tty = tty_open_by_driver(dev, NULL, NULL); > > + tty = tty_kopen(dev); > > if (IS_ERR(tty)) > > Hm, the "no tty layer" return value for this will be NULL. I doubt > that's really a big deal, but perhaps just have that return > PTR_ERR(-ENODEV) or something? Good point, thanks. Will send a follow up patch Okash