summaryrefslogtreecommitdiff
path: root/drivers/staging/speakup/spk_priv.h
diff options
context:
space:
mode:
authorOkash Khawaja <okash.khawaja@gmail.com>2017-06-25 19:40:01 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-27 09:12:33 +0200
commita5525dc0b8341cfa2d6c8bfe2796168a0ce83dfd (patch)
tree7a898206feb6132cd52f92026a316edfc1ee9cd5 /drivers/staging/speakup/spk_priv.h
parentfc61ed51270e86440cf7cf84cbe1d86753592932 (diff)
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_priv.h')
-rw-r--r--drivers/staging/speakup/spk_priv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/speakup/spk_priv.h b/drivers/staging/speakup/spk_priv.h
index 4f533667d312..87b6a0a4c54d 100644
--- a/drivers/staging/speakup/spk_priv.h
+++ b/drivers/staging/speakup/spk_priv.h
@@ -40,6 +40,8 @@
#define KT_SPKUP 15
#define SPK_SYNTH_TIMEOUT 100000 /* in micro-seconds */
+#define SYNTH_DEFAULT_DEV "ttyS0"
+#define SYNTH_DEFAULT_SER 0
const struct old_serial_port *spk_serial_init(int index);
void spk_stop_serial_interrupt(void);