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

Okash Khawaja okash.khawaja at gmail.com
Tue Jun 13 10:23:57 EDT 2017


On Mon, Jun 12, 2017 at 01:17:56PM +0100, Okash Khawaja 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 sanity checks on the string passed in. It currently supports
> ttyS*, ttyUSB* and, for selected synths, lp*.
> 
> In order to do this, the patch also introduces a string member variable
> named 'dev' to struct spk_synth. 'dev' represents the device name -
> ttyUSB0 etc - which needs conversion to dev_t.

Sorry should have marked it as v2 :)

Okash


More information about the Speakup mailing list