From: Cheah Kok Cheong Date: Mon, 5 Dec 2016 16:57:28 +0000 (+0800) Subject: Staging: comedi: kcomedilib: Add module_init/exit function X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c7ea8b51101484bda234b990ead032bf0b364752;p=linux-beck.git Staging: comedi: kcomedilib: Add module_init/exit function Add init/exit function to follow LKM semantics. Apparently this module can still load/unload without the init/exit function. Tested loading/unloading with and without this patch. Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c index d0a8a28edd36..55d43c076b1c 100644 --- a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c +++ b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c @@ -250,3 +250,15 @@ int comedi_get_n_channels(struct comedi_device *dev, unsigned int subdevice) return n; } EXPORT_SYMBOL_GPL(comedi_get_n_channels); + +static int __init kcomedilib_module_init(void) +{ + return 0; +} + +static void __exit kcomedilib_module_exit(void) +{ +} + +module_init(kcomedilib_module_init); +module_exit(kcomedilib_module_exit);