diff options
Diffstat (limited to 'drivers/staging/speakup')
25 files changed, 35 insertions, 24 deletions
diff --git a/drivers/staging/speakup/Makefile b/drivers/staging/speakup/Makefile index c864ea69c40d..5befb4933b85 100644 --- a/drivers/staging/speakup/Makefile +++ b/drivers/staging/speakup/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_SPEAKUP_SYNTH_ACNTSA) += speakup_acntsa.o obj-$(CONFIG_SPEAKUP_SYNTH_ACNTPC) += speakup_acntpc.o obj-$(CONFIG_SPEAKUP_SYNTH_APOLLO) += speakup_apollo.o diff --git a/drivers/staging/speakup/buffers.c b/drivers/staging/speakup/buffers.c index f459e4004bfa..6137fa83c609 100644 --- a/drivers/staging/speakup/buffers.c +++ b/drivers/staging/speakup/buffers.c @@ -27,7 +27,7 @@ void speakup_start_ttys(void) for (i = 0; i < MAX_NR_CONSOLES; i++) { if (speakup_console[i] && speakup_console[i]->tty_stopped) continue; - if ((vc_cons[i].d) && (vc_cons[i].d->port.tty)) + if (vc_cons[i].d && vc_cons[i].d->port.tty) start_tty(vc_cons[i].d->port.tty); } } @@ -38,7 +38,7 @@ static void speakup_stop_ttys(void) int i; for (i = 0; i < MAX_NR_CONSOLES; i++) - if ((vc_cons[i].d && (vc_cons[i].d->port.tty))) + if (vc_cons[i].d && vc_cons[i].d->port.tty) stop_tty(vc_cons[i].d->port.tty); } diff --git a/drivers/staging/speakup/devsynth.c b/drivers/staging/speakup/devsynth.c index 58abd1d85105..d920256328c3 100644 --- a/drivers/staging/speakup/devsynth.c +++ b/drivers/staging/speakup/devsynth.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <linux/errno.h> #include <linux/miscdevice.h> /* for misc_register, and SYNTH_MINOR */ #include <linux/types.h> diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 7809867f5d28..cea8707653f5 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Internationalization implementation. Includes definitions of English * string arrays, and the i18n pointer. */ diff --git a/drivers/staging/speakup/i18n.h b/drivers/staging/speakup/i18n.h index 8fcce566653f..2ec6e659d02b 100644 --- a/drivers/staging/speakup/i18n.h +++ b/drivers/staging/speakup/i18n.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef I18N_H #define I18N_H /* Internationalization declarations */ diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 56f7be6af1f6..aae868509e13 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -447,7 +447,7 @@ static void speak_char(u16 ch) cp = spk_characters[ch]; if (!cp) { - pr_info("speak_char: cp == NULL!\n"); + pr_info("%s: cp == NULL!\n", __func__); return; } if (IS_CHAR(ch, B_CAP)) { @@ -1164,8 +1164,8 @@ static void spkup_write(const u16 *in_buf, int count) static const int NUM_CTL_LABELS = (MSG_CTL_END - MSG_CTL_START + 1); static void read_all_doc(struct vc_data *vc); -static void cursor_done(u_long data); -static DEFINE_TIMER(cursor_timer, cursor_done, 0, 0); +static void cursor_done(struct timer_list *unused); +static DEFINE_TIMER(cursor_timer, cursor_done); static void do_handle_shift(struct vc_data *vc, u_char value, char up_flag) { @@ -1682,7 +1682,7 @@ static int speak_highlight(struct vc_data *vc) return 0; } -static void cursor_done(u_long data) +static void cursor_done(struct timer_list *unused) { struct vc_data *vc = vc_cons[cursor_con].d; unsigned long flags; @@ -2101,7 +2101,7 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym, u_char shift_info, offset; int ret = 0; - if (synth == NULL) + if (!synth) return 0; spin_lock_irqsave(&speakup_info.spinlock, flags); diff --git a/drivers/staging/speakup/selection.c b/drivers/staging/speakup/selection.c index 08f68fc2864e..66061b5c3427 100644 --- a/drivers/staging/speakup/selection.c +++ b/drivers/staging/speakup/selection.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <linux/slab.h> /* for kmalloc */ #include <linux/consolemap.h> #include <linux/interrupt.h> diff --git a/drivers/staging/speakup/serialio.h b/drivers/staging/speakup/serialio.h index 89de6fff9cb2..aa691e4a6916 100644 --- a/drivers/staging/speakup/serialio.h +++ b/drivers/staging/speakup/serialio.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _SPEAKUP_SERIAL_H #define _SPEAKUP_SERIAL_H diff --git a/drivers/staging/speakup/speakup.h b/drivers/staging/speakup/speakup.h index a654334c98b9..3d8bda8b9620 100644 --- a/drivers/staging/speakup/speakup.h +++ b/drivers/staging/speakup/speakup.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _SPEAKUP_H #define _SPEAKUP_H diff --git a/drivers/staging/speakup/speakup_acnt.h b/drivers/staging/speakup/speakup_acnt.h index 107ec1155f51..cffa938ae580 100644 --- a/drivers/staging/speakup/speakup_acnt.h +++ b/drivers/staging/speakup/speakup_acnt.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* speakup_acntpc.h - header file for speakups Accent-PC driver. */ #define SYNTH_IO_EXTENT 0x02 diff --git a/drivers/staging/speakup/speakup_acntsa.c b/drivers/staging/speakup/speakup_acntsa.c index 0e10404e2e8c..43315849b7b6 100644 --- a/drivers/staging/speakup/speakup_acntsa.c +++ b/drivers/staging/speakup/speakup_acntsa.c @@ -136,7 +136,7 @@ static int synth_probe(struct spk_synth *synth) } module_param_named(ser, synth_acntsa.ser, int, 0444); -module_param_named(dev, synth_acntsa.dev_name, charp, S_IRUGO); +module_param_named(dev, synth_acntsa.dev_name, charp, 0444); module_param_named(start, synth_acntsa.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); diff --git a/drivers/staging/speakup/speakup_apollo.c b/drivers/staging/speakup/speakup_apollo.c index 2edb56c8a559..dcf0c3b59fdd 100644 --- a/drivers/staging/speakup/speakup_apollo.c +++ b/drivers/staging/speakup/speakup_apollo.c @@ -200,7 +200,7 @@ static void do_catch_up(struct spk_synth *synth) } module_param_named(ser, synth_apollo.ser, int, 0444); -module_param_named(dev, synth_apollo.dev_name, charp, S_IRUGO); +module_param_named(dev, synth_apollo.dev_name, charp, 0444); module_param_named(start, synth_apollo.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); diff --git a/drivers/staging/speakup/speakup_audptr.c b/drivers/staging/speakup/speakup_audptr.c index 8ae826eba71c..45b5721441ba 100644 --- a/drivers/staging/speakup/speakup_audptr.c +++ b/drivers/staging/speakup/speakup_audptr.c @@ -163,7 +163,7 @@ static int synth_probe(struct spk_synth *synth) } module_param_named(ser, synth_audptr.ser, int, 0444); -module_param_named(dev, synth_audptr.dev_name, charp, S_IRUGO); +module_param_named(dev, synth_audptr.dev_name, charp, 0444); module_param_named(start, synth_audptr.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); diff --git a/drivers/staging/speakup/speakup_bns.c b/drivers/staging/speakup/speakup_bns.c index 60bcf0df8123..402b0fbfb94d 100644 --- a/drivers/staging/speakup/speakup_bns.c +++ b/drivers/staging/speakup/speakup_bns.c @@ -120,7 +120,7 @@ static struct spk_synth synth_bns = { }; module_param_named(ser, synth_bns.ser, int, 0444); -module_param_named(dev, synth_bns.dev_name, charp, S_IRUGO); +module_param_named(dev, synth_bns.dev_name, charp, 0444); module_param_named(start, synth_bns.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); diff --git a/drivers/staging/speakup/speakup_decext.c b/drivers/staging/speakup/speakup_decext.c index 95f4b2116d0c..4310c2c276c4 100644 --- a/drivers/staging/speakup/speakup_decext.c +++ b/drivers/staging/speakup/speakup_decext.c @@ -227,7 +227,7 @@ static void synth_flush(struct spk_synth *synth) } module_param_named(ser, synth_decext.ser, int, 0444); -module_param_named(dev, synth_decext.dev_name, charp, S_IRUGO); +module_param_named(dev, synth_decext.dev_name, charp, 0444); module_param_named(start, synth_decext.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); diff --git a/drivers/staging/speakup/speakup_dectlk.c b/drivers/staging/speakup/speakup_dectlk.c index f06995480022..5d6a861c9b1e 100644 --- a/drivers/staging/speakup/speakup_dectlk.c +++ b/drivers/staging/speakup/speakup_dectlk.c @@ -299,7 +299,7 @@ static void synth_flush(struct spk_synth *synth) } module_param_named(ser, synth_dectlk.ser, int, 0444); -module_param_named(dev, synth_dectlk.dev_name, charp, S_IRUGO); +module_param_named(dev, synth_dectlk.dev_name, charp, 0444); module_param_named(start, synth_dectlk.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); diff --git a/drivers/staging/speakup/speakup_dtlk.h b/drivers/staging/speakup/speakup_dtlk.h index 51ac0f2fcded..9c378b58066e 100644 --- a/drivers/staging/speakup/speakup_dtlk.h +++ b/drivers/staging/speakup/speakup_dtlk.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* speakup_dtlk.h - header file for speakups DoubleTalk driver. */ #define SYNTH_IO_EXTENT 0x02 diff --git a/drivers/staging/speakup/speakup_dummy.c b/drivers/staging/speakup/speakup_dummy.c index 851953d5eefb..ea3b2911cab9 100644 --- a/drivers/staging/speakup/speakup_dummy.c +++ b/drivers/staging/speakup/speakup_dummy.c @@ -122,7 +122,7 @@ static struct spk_synth synth_dummy = { }; module_param_named(ser, synth_dummy.ser, int, 0444); -module_param_named(dev, synth_dummy.dev_name, charp, S_IRUGO); +module_param_named(dev, synth_dummy.dev_name, charp, 0444); module_param_named(start, synth_dummy.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); diff --git a/drivers/staging/speakup/speakup_ltlk.c b/drivers/staging/speakup/speakup_ltlk.c index 423795f88f53..95efaab73813 100644 --- a/drivers/staging/speakup/speakup_ltlk.c +++ b/drivers/staging/speakup/speakup_ltlk.c @@ -167,7 +167,7 @@ static int synth_probe(struct spk_synth *synth) } module_param_named(ser, synth_ltlk.ser, int, 0444); -module_param_named(dev, synth_ltlk.dev_name, charp, S_IRUGO); +module_param_named(dev, synth_ltlk.dev_name, charp, 0444); module_param_named(start, synth_ltlk.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); diff --git a/drivers/staging/speakup/speakup_spkout.c b/drivers/staging/speakup/speakup_spkout.c index 9ca21edc42ce..1037aa0d085a 100644 --- a/drivers/staging/speakup/speakup_spkout.c +++ b/drivers/staging/speakup/speakup_spkout.c @@ -131,7 +131,7 @@ static void synth_flush(struct spk_synth *synth) } module_param_named(ser, synth_spkout.ser, int, 0444); -module_param_named(dev, synth_spkout.dev_name, charp, S_IRUGO); +module_param_named(dev, synth_spkout.dev_name, charp, 0444); module_param_named(start, synth_spkout.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); diff --git a/drivers/staging/speakup/speakup_txprt.c b/drivers/staging/speakup/speakup_txprt.c index 831ee404e7a1..e160034e4a68 100644 --- a/drivers/staging/speakup/speakup_txprt.c +++ b/drivers/staging/speakup/speakup_txprt.c @@ -119,7 +119,7 @@ static struct spk_synth synth_txprt = { }; module_param_named(ser, synth_txprt.ser, int, 0444); -module_param_named(dev, synth_txprt.dev_name, charp, S_IRUGO); +module_param_named(dev, synth_txprt.dev_name, charp, 0444); module_param_named(start, synth_txprt.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); diff --git a/drivers/staging/speakup/speakupmap.h b/drivers/staging/speakup/speakupmap.h index f1c0dd3b2c3a..c60d7339b89a 100644 --- a/drivers/staging/speakup/speakupmap.h +++ b/drivers/staging/speakup/speakupmap.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ 119, 62, 6, 0, 16, 20, 17, 32, 48, 0, 2, 0, 78, 0, 0, 0, 0, diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c index 4d7d8f2f66ea..513cebbd161c 100644 --- a/drivers/staging/speakup/spk_ttyio.c +++ b/drivers/staging/speakup/spk_ttyio.c @@ -51,10 +51,8 @@ static int spk_ttyio_ldisc_open(struct tty_struct *tty) speakup_tty = tty; ldisc_data = kmalloc(sizeof(struct spk_ldisc_data), GFP_KERNEL); - if (!ldisc_data) { - pr_err("speakup: Failed to allocate ldisc_data.\n"); + if (!ldisc_data) return -ENOMEM; - } sema_init(&ldisc_data->sem, 0); ldisc_data->buf_free = true; @@ -90,7 +88,8 @@ static int spk_ttyio_receive_buf2(struct tty_struct *tty, return 0; /* Make sure the consumer has read buf before we have seen - * buf_free == true and overwrite buf */ + * buf_free == true and overwrite buf + */ mb(); ldisc_data->buf = cp[0]; @@ -276,7 +275,8 @@ static unsigned char ttyio_in(int timeout) rv = ldisc_data->buf; /* Make sure we have read buf before we set buf_free to let - * the producer overwrite it */ + * the producer overwrite it + */ mb(); ldisc_data->buf_free = true; /* Let TTY push more characters */ diff --git a/drivers/staging/speakup/spk_types.h b/drivers/staging/speakup/spk_types.h index 22f657d45e46..c50de6035a9a 100644 --- a/drivers/staging/speakup/spk_types.h +++ b/drivers/staging/speakup/spk_types.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef SPEAKUP_TYPES_H #define SPEAKUP_TYPES_H diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c index a1ca68c76579..aac29c816d09 100644 --- a/drivers/staging/speakup/synth.c +++ b/drivers/staging/speakup/synth.c @@ -153,12 +153,12 @@ int spk_synth_is_alive_restart(struct spk_synth *synth) } EXPORT_SYMBOL_GPL(spk_synth_is_alive_restart); -static void thread_wake_up(u_long data) +static void thread_wake_up(struct timer_list *unused) { wake_up_interruptible_all(&speakup_event); } -static DEFINE_TIMER(thread_timer, thread_wake_up, 0, 0); +static DEFINE_TIMER(thread_timer, thread_wake_up); void synth_start(void) { |