Re: [patch v2 1/3] tty: add function to convert device name to number

2017-06-19 Thread Okash Khawaja
On Sun, Jun 18, 2017 at 04:27:42PM +0300, Andy Shevchenko wrote: > This doesn't have actual parameter name. > Btw, I would drop dev_ suffix completely from parameter (you have it > in function name). Good call, thanks. > > + * Locking: this acquires tty_mutex > > ...and releases. > > Perhap

Re: [patch v2 1/3] tty: add function to convert device name to number

2017-06-18 Thread Andy Shevchenko
On Sun, Jun 18, 2017 at 11:58 AM, Okash Khawaja wrote: > The function converts strings like ttyS0 and ttyUSB0 to dev_t like > (4, 64) and (188, 0). It does this by scanning tty_drivers list for > corresponding device name and index. If the driver is not registered, > this function returns -ENODEV.

[patch v2 1/3] tty: add function to convert device name to number

2017-06-18 Thread Okash Khawaja
The function converts strings like ttyS0 and ttyUSB0 to dev_t like (4, 64) and (188, 0). It does this by scanning tty_drivers list for corresponding device name and index. If the driver is not registered, this function returns -ENODEV. It also acquires tty_mutex. Signed-off-by: Okash Khawaja ---