Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755615Ab2JZPYs (ORCPT ); Fri, 26 Oct 2012 11:24:48 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:59357 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753273Ab2JZPYq (ORCPT ); Fri, 26 Oct 2012 11:24:46 -0400 MIME-Version: 1.0 Date: Fri, 26 Oct 2012 23:24:46 +0800 Message-ID: Subject: [PATCH -next] staging: comedi: skel: use module_comedi_driver to simplify the code From: Wei Yongjun To: abbotti@mev.co.uk, fmhess@users.sourceforge.net, gregkh@linuxfoundation.org Cc: yongjun_wei@trendmicro.com.cn, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1420 Lines: 44 From: Wei Yongjun Use the module_comedi_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/staging/comedi/drivers/skel.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/staging/comedi/drivers/skel.c b/drivers/staging/comedi/drivers/skel.c index f292d79..e1b78a1 100644 --- a/drivers/staging/comedi/drivers/skel.c +++ b/drivers/staging/comedi/drivers/skel.c @@ -628,18 +628,7 @@ static void __exit driver_skel_cleanup_module(void) module_init(driver_skel_init_module); module_exit(driver_skel_cleanup_module); #else -static int __init driver_skel_init_module(void) -{ - return comedi_driver_register(&driver_skel); -} - -static void __exit driver_skel_cleanup_module(void) -{ - comedi_driver_unregister(&driver_skel); -} - -module_init(driver_skel_init_module); -module_exit(driver_skel_cleanup_module); +module_comedi_driver(driver_skel); #endif MODULE_AUTHOR("Comedi http://www.comedi.org"); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/