From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752597AbcIIO2U (ORCPT ); Fri, 9 Sep 2016 10:28:20 -0400 Received: from mail1.windriver.com ([147.11.146.13]:40168 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750899AbcIIO2S (ORCPT ); Fri, 9 Sep 2016 10:28:18 -0400 From: Paul Gortmaker To: CC: Paul Gortmaker , Alessandro Rubini Subject: [PATCH] fmc: don't include moduleparam.h in include/linux header files. Date: Fri, 9 Sep 2016 10:27:01 -0400 Message-ID: <20160909142701.14057-1-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.8.4 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We try to keep cross linkages between include/linux files to a minimum wherever possible. To that end, we avoid having the include/linux headers sourcing module.h or moduleparam.h (which sources module.h). Here we see moduleparam.h was included in one for the following: /* These are the generic parameters, that drivers may instantiate */ #define FMC_PARAM_BUSID(_d) \ module_param_array_named(busid, _d.busid_val, int, &_d.busid_n, 0444) #define FMC_PARAM_GATEWARE(_d) \ module_param_array_named(gateware, _d.gw_val, charp, &_d.gw_n, 0444) However, since they are #define, it is the driver's responsibility to include moduleparam.h should it decide to make use of any of these. So move the include to the one and only driver to use these macros and ensure we keep setting the proper example in include/linux headers. Cc: Alessandro Rubini Signed-off-by: Paul Gortmaker --- drivers/fmc/fmc-trivial.c | 1 + include/linux/fmc.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/fmc/fmc-trivial.c b/drivers/fmc/fmc-trivial.c index 6c590f54c79d..44d93dd88a5f 100644 --- a/drivers/fmc/fmc-trivial.c +++ b/drivers/fmc/fmc-trivial.c @@ -13,6 +13,7 @@ /* A trivial fmc driver that can load a gateware file and reports interrupts */ #include +#include #include #include #include diff --git a/include/linux/fmc.h b/include/linux/fmc.h index a5f0aa5c2a8d..2aeea0a747a4 100644 --- a/include/linux/fmc.h +++ b/include/linux/fmc.h @@ -10,7 +10,6 @@ #ifndef __LINUX_FMC_H__ #define __LINUX_FMC_H__ #include -#include #include #include #include -- 2.8.4