From ae89faccc6bae384f10a0efd7fec001e89b15e63 Mon Sep 17 00:00:00 2001 From: Vaishali Thakkar Date: Wed, 18 Mar 2015 23:13:10 +0530 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/speakup/speakup_dummy.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'drivers/staging/speakup/speakup_dummy.c') diff --git a/drivers/staging/speakup/speakup_dummy.c b/drivers/staging/speakup/speakup_dummy.c index 362342a194af..f66811269475 100644 --- a/drivers/staging/speakup/speakup_dummy.c +++ b/drivers/staging/speakup/speakup_dummy.c @@ -129,18 +129,8 @@ module_param_named(start, synth_dummy.startup, short, S_IRUGO); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); -static int __init dummy_init(void) -{ - return synth_add(&synth_dummy); -} +module_spk_synth(synth_dummy); -static void __exit dummy_exit(void) -{ - synth_remove(&synth_dummy); -} - -module_init(dummy_init); -module_exit(dummy_exit); MODULE_AUTHOR("Samuel Thibault "); MODULE_DESCRIPTION("Speakup support for text console"); MODULE_LICENSE("GPL"); -- cgit v1.2.3-59-g8ed1b