From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757674AbcILWRD (ORCPT ); Mon, 12 Sep 2016 18:17:03 -0400 Received: from mail.windriver.com ([147.11.1.11]:37629 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757435AbcILWQ7 (ORCPT ); Mon, 12 Sep 2016 18:16:59 -0400 From: Paul Gortmaker To: CC: Paul Gortmaker , Ajay Thomas , Alexandre Courbot , Andy Shevchenko , Bin Gao , Keguang Zhang , Linus Walleij , , , Mika Westerberg Subject: [PATCH 0/8] gpio: wean gpio/driver.h off of module.h Date: Mon, 12 Sep 2016 18:16:23 -0400 Message-ID: <20160912221631.15812-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 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. But before we do, we fix up seven instances of code that were implicitly relying on this module.h so that we don't introduce build failures into the git history. Some are tristate, so we just explicitly add module.h to them. The others are non-modular, so we just prune them off of the module based macros, so that module.h is no longer required to compile. This series built on top of linux-next for arm, arm64, i386, x86_64 without any issues (allmodconfig). --- Cc: Ajay Thomas Cc: Alexandre Courbot Cc: Andy Shevchenko Cc: Bin Gao Cc: Keguang Zhang Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: Mika Westerberg Paul Gortmaker (8): gpio: palmas: fix implicit assumption module.h is present gpio: sx150x: fix implicit assumption module.h is present gpio: ts4800: fix implicit assumption module.h is present gpio: altera: fix implicit assumption module.h is present gpio: ath79: fix implicit assumption module.h is present gpio: loongson1: fix implicit assumption module.h is present gpio: wcove: fix implicit assumption module.h is present gpio: don't include module.h in shared driver header drivers/gpio/gpio-altera.c | 1 + drivers/gpio/gpio-ath79.c | 1 + drivers/gpio/gpio-loongson1.c | 1 + drivers/gpio/gpio-palmas.c | 1 - drivers/gpio/gpio-sx150x.c | 2 -- drivers/gpio/gpio-ts4800.c | 1 + drivers/gpio/gpio-wcove.c | 1 + include/linux/gpio/driver.h | 2 +- 8 files changed, 6 insertions(+), 4 deletions(-) -- 2.8.4