aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/speakup_soft.c
diff options
context:
space:
mode:
authorVaishali Thakkar <vthakkar1994@gmail.com>2015-03-18 23:13:10 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-20 13:27:34 +0100
commitae89faccc6bae384f10a0efd7fec001e89b15e63 (patch)
tree8109b2d2a3fef35334fc6986a5f6b24f4ab6be34 /drivers/staging/speakup/speakup_soft.c
parentStaging: speakup: Add helper macro for spk_synth boilerplate (diff)
downloadlinux-dev-ae89faccc6bae384f10a0efd7fec001e89b15e63.tar.xz
linux-dev-ae89faccc6bae384f10a0efd7fec001e89b15e63.zip
Staging: speakup: Use module_spk_synth
Macro module_spk_synth can be used for speakup drivers whose init and exit paths does only module registrations. So, here remove some boilerplate code by using module_spk_synth. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup/speakup_soft.c')
-rw-r--r--drivers/staging/speakup/speakup_soft.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c
index e6e93fbd183a..fb31bb95d83a 100644
--- a/drivers/staging/speakup/speakup_soft.c
+++ b/drivers/staging/speakup/speakup_soft.c
@@ -350,19 +350,8 @@ module_param_named(start, synth_soft.startup, short, S_IRUGO);
MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
+module_spk_synth(synth_soft);
-static int __init soft_init(void)
-{
- return synth_add(&synth_soft);
-}
-
-static void __exit soft_exit(void)
-{
- synth_remove(&synth_soft);
-}
-
-module_init(soft_init);
-module_exit(soft_exit);
MODULE_AUTHOR("Kirk Reiser <kirk@braille.uwo.ca>");
MODULE_DESCRIPTION("Speakup userspace software synthesizer support");
MODULE_LICENSE("GPL");