From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pa0-f53.google.com ([209.85.220.53]:64781 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753335AbaKEDSx (ORCPT ); Tue, 4 Nov 2014 22:18:53 -0500 From: "Luis R. Rodriguez" To: backports@vger.kernel.org Cc: linux-kernel@vger.kernel.org, yann.morin.1998@free.fr, mmarek@suse.cz, sassmann@kpanic.de, "Luis R. Rodriguez" Subject: [PATCH v2 02/13] backports: ifdef around module_init() module_exit() for modules Date: Tue, 4 Nov 2014 19:18:26 -0800 Message-Id: <1415157517-15442-3-git-send-email-mcgrof@do-not-panic.com> (sfid-20141105_042221_148675_6252699F) In-Reply-To: <1415157517-15442-1-git-send-email-mcgrof@do-not-panic.com> References: <1415157517-15442-1-git-send-email-mcgrof@do-not-panic.com> Sender: backports-owner@vger.kernel.org List-ID: From: "Luis R. Rodriguez" We only need this for modules. Signed-off-by: Luis R. Rodriguez --- backport/backport-include/linux/module.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backport/backport-include/linux/module.h b/backport/backport-include/linux/module.h index 82c96bd..e8f28b1 100644 --- a/backport/backport-include/linux/module.h +++ b/backport/backport-include/linux/module.h @@ -25,6 +25,7 @@ extern void backport_dependency_symbol(void); " using backports " BACKPORTS_VERSION); #endif +#ifdef MODULE #undef module_init #define module_init(initfn) \ static int __init __init_backport(void) \ @@ -58,6 +59,7 @@ extern void backport_dependency_symbol(void); rcu_barrier(); \ } \ void cleanup_module(void) __attribute__((alias("__exit_compat"))); +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) #undef param_check_bool -- 2.1.1