Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752793AbdFQK6A (ORCPT ); Sat, 17 Jun 2017 06:58:00 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33352 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752190AbdFQK56 (ORCPT ); Sat, 17 Jun 2017 06:57:58 -0400 Date: Sat, 17 Jun 2017 11:57:54 +0100 From: Okash Khawaja To: Greg Kroah-Hartman Cc: Andy Shevchenko , Samuel Thibault , Jiri Slaby , "linux-kernel@vger.kernel.org" , devel@driverdev.osuosl.org, Kirk Reiser , speakup@linux-speakup.org, Chris Brannon Subject: Re: [patch 1/2] staging: speakup: add function to convert dev name to number Message-ID: <20170617105754.GA31689@sanghar> References: <20170614101326.GA7606@kroah.com> <20170614101541.GA8065@kroah.com> <20170614112609.uqpvl2z5aoi5jchc@var.youpi.perso.aquilenet.fr> <20170614114802.GA23345@kroah.com> <20170614121819.tob426qpysswg5g6@var.youpi.perso.aquilenet.fr> <20170614130418.GA1184@kroah.com> <20170615065251.GB372@sanghar> <20170617101644.GA31565@sanghar> <20170617102534.GA24564@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170617102534.GA24564@kroah.com> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1275 Lines: 27 On Sat, Jun 17, 2017 at 12:25:34PM +0200, Greg Kroah-Hartman wrote: > On Sat, Jun 17, 2017 at 11:16:44AM +0100, Okash Khawaja wrote: > > Hi, > > > > On Thu, Jun 15, 2017 at 07:52:51AM +0100, Okash Khawaja wrote: > > > On Wed, Jun 14, 2017 at 03:04:18PM +0200, Greg Kroah-Hartman wrote: > > > > The console stuff is odd though, but that is each driver defining the > > > > name for itself, major/minor does not apply. Also, a separate driver is > > > > not having to figure this all out. I wonder if we could just add a tty > > > > core function for this as it does know the name of everything that has > > > > been registered with it, right? > > > > > > I can start working on a patch for this. I'm still new to the tty code > > > so will follow up with any questions I might have. > > > > I've put together this function for converting device name to number. > > It traverses tty_drivers list looking for corresponding dev name and > > index. Is this the right approach? > > Yes, this looks great, nice job! It is a lot simpler than your previous > function, and now you are not limited to just a subset off the different > serial ports in the system. > > Keep up the good work, it's really appreciated. Great, thanks. I'll re-send the full patch set as v2. Okash