git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
staging: speakup_soft: Fix reading of init string
[pandora-kernel.git]
/
drivers
/
staging
/
speakup
/
speakup_soft.c
diff --git
a/drivers/staging/speakup/speakup_soft.c
b/drivers/staging/speakup/speakup_soft.c
index
42cdafe
..
b5130c8
100644
(file)
--- a/
drivers/staging/speakup/speakup_soft.c
+++ b/
drivers/staging/speakup/speakup_soft.c
@@
-40,7
+40,7
@@
static int softsynth_is_alive(struct spk_synth *synth);
static unsigned char get_index(void);
static struct miscdevice synth_device;
static unsigned char get_index(void);
static struct miscdevice synth_device;
-static int init
ialized
;
+static int init
_pos
;
static int misc_registered;
static struct var_t vars[] = {
static int misc_registered;
static struct var_t vars[] = {
@@
-194,7
+194,7
@@
static int softsynth_close(struct inode *inode, struct file *fp)
unsigned long flags;
spk_lock(flags);
synth_soft.alive = 0;
unsigned long flags;
spk_lock(flags);
synth_soft.alive = 0;
- init
ialized
= 0;
+ init
_pos
= 0;
spk_unlock(flags);
/* Make sure we let applications go before leaving */
speakup_start_ttys();
spk_unlock(flags);
/* Make sure we let applications go before leaving */
speakup_start_ttys();
@@
-239,13
+239,8
@@
static ssize_t softsynth_read(struct file *fp, char *buf, size_t count,
ch = '\x18';
} else if (synth_buffer_empty()) {
break;
ch = '\x18';
} else if (synth_buffer_empty()) {
break;
- } else if (!initialized) {
- if (*init) {
- ch = *init;
- init++;
- } else {
- initialized = 1;
- }
+ } else if (init[init_pos]) {
+ ch = init[init_pos++];
} else {
ch = synth_buffer_getc();
}
} else {
ch = synth_buffer_getc();
}