Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751764AbcLERbj (ORCPT ); Mon, 5 Dec 2016 12:31:39 -0500 Received: from smtp97.ord1c.emailsrvr.com ([108.166.43.97]:48461 "EHLO smtp97.ord1c.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751100AbcLERbi (ORCPT ); Mon, 5 Dec 2016 12:31:38 -0500 X-Greylist: delayed 452 seconds by postgrey-1.27 at vger.kernel.org; Mon, 05 Dec 2016 12:31:37 EST X-Auth-ID: abbotti@mev.co.uk X-Sender-Id: abbotti@mev.co.uk Subject: Re: [PATCH] Staging: comedi: kcomedilib: Add module_init/exit function To: Cheah Kok Cheong , hsweeten@visionengravers.com, gregkh@linuxfoundation.org References: <1480957048-9246-1-git-send-email-thrust73@gmail.com> Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org From: Ian Abbott Message-ID: Date: Mon, 5 Dec 2016 17:24:02 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <1480957048-9246-1-git-send-email-thrust73@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1265 Lines: 41 On 05/12/16 16:57, Cheah Kok Cheong wrote: > 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); > Looks good, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd. E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-