Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751547AbcLEQ6z (ORCPT ); Mon, 5 Dec 2016 11:58:55 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33911 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751201AbcLEQ6y (ORCPT ); Mon, 5 Dec 2016 11:58:54 -0500 From: Cheah Kok Cheong To: hsweeten@visionengravers.com, abbotti@mev.co.uk, gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Cheah Kok Cheong Subject: [PATCH] Staging: comedi: kcomedilib: Add module_init/exit function Date: Tue, 6 Dec 2016 00:57:28 +0800 Message-Id: <1480957048-9246-1-git-send-email-thrust73@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 978 Lines: 33 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 --- drivers/staging/comedi/kcomedilib/kcomedilib_main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c index d0a8a28..55d43c0 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); -- 2.7.4