[patch 3/6] staging: speakup: refactor spk_stop_serial_interrupt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This moves call to spk_stop_serial_interrupt() function out of synth_release()
and into release() method of specific spk_synth instances. This is because
a TTY-based synth implementation wouldn't need spk_stop_serial_interrupt()
call. Moving it into each synth's release() method gives the decision of
calling  spk_stop_serial_interrupt() to that synth. TTY-based synths which
follow in this patchset simply woudn't call it.

Signed-off-by: Okash Khawaja <okash.khawaja@xxxxxxxxx>

Index: linux-stable/drivers/staging/speakup/serialio.c
===================================================================
--- linux-stable.orig/drivers/staging/speakup/serialio.c
+++ linux-stable/drivers/staging/speakup/serialio.c
@@ -219,6 +219,7 @@
 
 void spk_serial_release(void)
 {
+	spk_stop_serial_interrupt();
 	if (speakup_info.port_tts == 0)
 		return;
 	synth_release_region(speakup_info.port_tts, 8);
Index: linux-stable/drivers/staging/speakup/speakup_acntpc.c
===================================================================
--- linux-stable.orig/drivers/staging/speakup/speakup_acntpc.c
+++ linux-stable/drivers/staging/speakup/speakup_acntpc.c
@@ -303,6 +303,7 @@
 
 static void accent_release(void)
 {
+	spk_stop_serial_interrupt();
 	if (speakup_info.port_tts)
 		synth_release_region(speakup_info.port_tts-1, SYNTH_IO_EXTENT);
 	speakup_info.port_tts = 0;
Index: linux-stable/drivers/staging/speakup/speakup_decpc.c
===================================================================
--- linux-stable.orig/drivers/staging/speakup/speakup_decpc.c
+++ linux-stable/drivers/staging/speakup/speakup_decpc.c
@@ -482,6 +482,7 @@
 
 static void dtpc_release(void)
 {
+	spk_stop_serial_interrupt();
 	if (speakup_info.port_tts)
 		synth_release_region(speakup_info.port_tts, SYNTH_IO_EXTENT);
 	speakup_info.port_tts = 0;
Index: linux-stable/drivers/staging/speakup/speakup_dtlk.c
===================================================================
--- linux-stable.orig/drivers/staging/speakup/speakup_dtlk.c
+++ linux-stable/drivers/staging/speakup/speakup_dtlk.c
@@ -374,6 +374,7 @@
 
 static void dtlk_release(void)
 {
+	spk_stop_serial_interrupt();
 	if (speakup_info.port_tts)
 		synth_release_region(speakup_info.port_tts-1, SYNTH_IO_EXTENT);
 	speakup_info.port_tts = 0;
Index: linux-stable/drivers/staging/speakup/speakup_keypc.c
===================================================================
--- linux-stable.orig/drivers/staging/speakup/speakup_keypc.c
+++ linux-stable/drivers/staging/speakup/speakup_keypc.c
@@ -305,6 +305,7 @@
 
 static void keynote_release(void)
 {
+	spk_stop_serial_interrupt();
 	if (synth_port)
 		synth_release_region(synth_port, SYNTH_IO_EXTENT);
 	synth_port = 0;
Index: linux-stable/drivers/staging/speakup/synth.c
===================================================================
--- linux-stable.orig/drivers/staging/speakup/synth.c
+++ linux-stable/drivers/staging/speakup/synth.c
@@ -432,7 +432,6 @@
 		sysfs_remove_group(speakup_kobj, &synth->attributes);
 	for (var = synth->vars; var->var_id != MAXVARS; var++)
 		speakup_unregister_var(var->var_id);
-	spk_stop_serial_interrupt();
 	synth->release();
 	synth = NULL;
 }
_______________________________________________
Speakup mailing list
Speakup@xxxxxxxxxxxxxxxxx
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux