From patchwork Mon Sep 12 22:16:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 669046 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3sY2HL3ZQvz9sdn for ; Tue, 13 Sep 2016 08:17:34 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757580AbcILWRD (ORCPT ); Mon, 12 Sep 2016 18:17:03 -0400 Received: from mail5.windriver.com ([192.103.53.11]:38244 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757415AbcILWQ7 (ORCPT ); Mon, 12 Sep 2016 18:16:59 -0400 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id u8CMGvIJ019354 (version=TLSv1 cipher=AES128-SHA bits=128 verify=OK); Mon, 12 Sep 2016 15:16:57 -0700 Received: from yow-lpgnfs-02.wrs.com (128.224.149.8) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.294.0; Mon, 12 Sep 2016 15:16:57 -0700 From: Paul Gortmaker To: CC: Paul Gortmaker , Linus Walleij , Alexandre Courbot , Subject: [PATCH 8/8] gpio: don't include module.h in shared driver header Date: Mon, 12 Sep 2016 18:16:31 -0400 Message-ID: <20160912221631.15812-9-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20160912221631.15812-1-paul.gortmaker@windriver.com> References: <20160912221631.15812-1-paul.gortmaker@windriver.com> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Most shared headers in include/linux don't need to know what the internals of a struct module are; all they care about is that it is a struct and hence they may require a pointer to one. The advantage in this is that module.h is including a lot of stuff itself, and an otherwise empty C file that just contains module.h will result in ~750kB from CPP (compared to say 12kB from init.h) So we have approximately 50 instances of "struct module;" in the various include/linux headers already that help us keep module.h out of other headers; here we do the same for gpio. Cc: Linus Walleij Cc: Alexandre Courbot Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker --- include/linux/gpio/driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 50882e09289b..216e6f275aa8 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -3,7 +3,6 @@ #include #include -#include #include #include #include @@ -16,6 +15,7 @@ struct of_phandle_args; struct device_node; struct seq_file; struct gpio_device; +struct module; #ifdef CONFIG_GPIOLIB