Re: [patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-17 Thread Okash Khawaja
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: > > > >

Re: [patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-17 Thread Greg Kroah-Hartman
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

Re: [patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-17 Thread Okash Khawaja
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

Re: [patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-15 Thread Okash Khawaja
Hi, On Wed, Jun 14, 2017 at 9:23 AM, Dan Carpenter wrote: [...] > > Could you call it "dev_name" instead? I normally expect "dev" to be a > device struct. Thanks for the feedback. Will keep these in mind for next version of the patch. Okash

Re: [patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-15 Thread Okash Khawaja
Hi, 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 >

Re: [patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-14 Thread Greg Kroah-Hartman
On Wed, Jun 14, 2017 at 03:36:30PM +0300, Andy Shevchenko wrote: > On Wed, Jun 14, 2017 at 3:18 PM, Samuel Thibault > wrote: > > Greg KH, on mer. 14 juin 2017 13:48:02 +0200, wrote: > >> On Wed, Jun 14, 2017 at 01:26:09PM +0200, Samuel Thibault wrote: > >> > Greg KH,

Re: [patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-14 Thread Samuel Thibault
Andy Shevchenko, on mer. 14 juin 2017 15:36:30 +0300, wrote: > On Wed, Jun 14, 2017 at 3:18 PM, Samuel Thibault > wrote: > > Greg KH, on mer. 14 juin 2017 13:48:02 +0200, wrote: > >> On Wed, Jun 14, 2017 at 01:26:09PM +0200, Samuel Thibault wrote: > >> > Greg KH, on

Re: [patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-14 Thread Andy Shevchenko
On Wed, Jun 14, 2017 at 3:18 PM, Samuel Thibault wrote: > Greg KH, on mer. 14 juin 2017 13:48:02 +0200, wrote: >> On Wed, Jun 14, 2017 at 01:26:09PM +0200, Samuel Thibault wrote: >> > Greg KH, on mer. 14 juin 2017 12:15:41 +0200, wrote: >> And trying to have the

Re: [patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-14 Thread Samuel Thibault
Greg KH, on mer. 14 juin 2017 13:48:02 +0200, wrote: > On Wed, Jun 14, 2017 at 01:26:09PM +0200, Samuel Thibault wrote: > > Greg KH, on mer. 14 juin 2017 12:15:41 +0200, wrote: > > > Ah, no, nevermind, you just need the major/minor. So why not just take > > > that as the input here, and not a

Re: [patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-14 Thread Greg Kroah-Hartman
On Wed, Jun 14, 2017 at 01:26:09PM +0200, Samuel Thibault wrote: > Greg KH, on mer. 14 juin 2017 12:15:41 +0200, wrote: > > Ah, no, nevermind, you just need the major/minor. So why not just take > > that as the input here, and not a string? > > Because real users don't know about major/minor

Re: [patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-14 Thread Samuel Thibault
Greg KH, on mer. 14 juin 2017 12:15:41 +0200, wrote: > Ah, no, nevermind, you just need the major/minor. So why not just take > that as the input here, and not a string? Because real users don't know about major/minor numbers. Samuel ___ devel mailing

Re: [patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-14 Thread Greg Kroah-Hartman
On Wed, Jun 14, 2017 at 12:13:26PM +0200, Greg Kroah-Hartman wrote: > On Tue, Jun 13, 2017 at 11:37:03PM +0100, okash.khaw...@gmail.com wrote: > > The function converts strings like ttyS0 and ttyUSB0 to dev_t like > > (4, 64) and (188, 0). Subsequent patch in this set will call it to > > convert

Re: [patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-14 Thread Greg Kroah-Hartman
On Tue, Jun 13, 2017 at 11:37:03PM +0100, okash.khaw...@gmail.com wrote: > The function converts strings like ttyS0 and ttyUSB0 to dev_t like > (4, 64) and (188, 0). Subsequent patch in this set will call it to > convert user-supplied device into device number. The function does > some basic

Re: [patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-14 Thread Dan Carpenter
On Tue, Jun 13, 2017 at 11:37:03PM +0100, okash.khaw...@gmail.com wrote: > The function converts strings like ttyS0 and ttyUSB0 to dev_t like > (4, 64) and (188, 0). Subsequent patch in this set will call it to > convert user-supplied device into device number. The function does > some basic

[patch 1/2] staging: speakup: add function to convert dev name to number

2017-06-13 Thread okash . khawaja
The function converts strings like ttyS0 and ttyUSB0 to dev_t like (4, 64) and (188, 0). Subsequent patch in this set will call it to convert user-supplied device into device number. The function does some basic sanity checks on the string passed in. It currently supports ttyS*, ttyUSB* and, for