summaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/spk_types.h
diff options
context:
space:
mode:
authorOkash Khawaja2017-06-25 20:40:01 +0200
committerGreg Kroah-Hartman2017-06-27 09:12:33 +0200
commita5525dc0b8341cfa2d6c8bfe2796168a0ce83dfd (patch)
tree7a898206feb6132cd52f92026a316edfc1ee9cd5 /drivers/staging/speakup/spk_types.h
parenttty: add function to convert device name to number (diff)
downloadkernel-qcow2-linux-a5525dc0b8341cfa2d6c8bfe2796168a0ce83dfd.tar.gz
kernel-qcow2-linux-a5525dc0b8341cfa2d6c8bfe2796168a0ce83dfd.tar.xz
kernel-qcow2-linux-a5525dc0b8341cfa2d6c8bfe2796168a0ce83dfd.zip
staging: speakup: check and convert dev name or ser to dev_t
This patch adds functionality to validate and convert either a device name or 'ser' memmber of synth into dev_t. Subsequent patch in this set will call it to convert user-specified device into device number. For device name, this patch does some basic sanity checks on the string passed in. It currently supports ttyS*, ttyUSB* and, for selected synths, lp*. The patch also introduces a string member variable named 'dev_name' to struct spk_synth. 'dev_name' represents the device name - ttyUSB0 etc - which needs conversion to dev_t. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup/spk_types.h')
-rw-r--r--drivers/staging/speakup/spk_types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/speakup/spk_types.h b/drivers/staging/speakup/spk_types.h
index 9e3889749d43..22f657d45e46 100644
--- a/drivers/staging/speakup/spk_types.h
+++ b/drivers/staging/speakup/spk_types.h
@@ -169,6 +169,7 @@ struct spk_synth {
int jiffies;
int full;
int ser;
+ char *dev_name;
short flags;
short startup;
const int checkval; /* for validating a proper synth module */