From patchwork Fri Dec 30 12:47:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 89345 Delivered-To: patches@linaro.org Received: by 10.140.20.101 with SMTP id 92csp6424694qgi; Fri, 30 Dec 2016 04:48:18 -0800 (PST) X-Received: by 10.25.167.20 with SMTP id q20mr16727519lfe.115.1483102098070; Fri, 30 Dec 2016 04:48:18 -0800 (PST) Return-Path: Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com. [2a00:1450:4010:c07::22d]) by mx.google.com with ESMTPS id c18si33052328ljb.38.2016.12.30.04.48.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Dec 2016 04:48:18 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22d as permitted sender) client-ip=2a00:1450:4010:c07::22d; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22d as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x22d.google.com with SMTP id c13so236668985lfg.0 for ; Fri, 30 Dec 2016 04:48:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Nqy+pBT5jhZEMvaJyi8U+TkRzL6alF/JnfWdinJpe1Y=; b=jBK2hUsexoBCcY0i5JaAkwSX4Wz771KOrC4PTjffEMSzMShO0Wyi2NYyV1rkpIPcmF 5HCFSimv6uCm1Hms/I5E8oLfMHR0uZXzNinUUdUVNiBRjPu3CjGLthD2YLaAD2o9n6uV IjJgMixQ0AliOrBDZF+FX6wWl4wNWD8pNHiKM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Nqy+pBT5jhZEMvaJyi8U+TkRzL6alF/JnfWdinJpe1Y=; b=IQS4UUSi8fhXkFNEaeVIa15CVpvm2kxS4G7ne8lNGLjtpGmMslInQiE1/yqEYzRiiz 3A+V5W2B5h5rBXsI5LlWo6vBtPhYGfLC8+IbjfT83e7eNdMRz3Eo51RkugDyIuwIb+wg uDDor+snfhfB3IlzL5Uvoour/7RdJIbhbhGo/cUfREmBy6+fRGrOAaTEk8rkv4rVI4Vo lpb8zjHNl4lxKEnbUf+gNeLCgN7AxDqwoUPwx0EGEUMcZTor/sihT0nzLY3DFHiWuz/1 m1KLZykH1TP00/uPDBGa/DdXAPJY7EXxDNWV5PIh5w6Y62lg9OTNskvwU1AYupA4Cf9a 5mgg== X-Gm-Message-State: AIkVDXLuy+lOmLqbT4M8uz7EHeqT9YSB6D9exinN/ZuZPsGnR6Esj6N7eODRHowAxAhO0vPFOfM= X-Received: by 10.25.16.71 with SMTP id f68mr16194989lfi.93.1483102097624; Fri, 30 Dec 2016 04:48:17 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-155-4-221-67.na.cust.bahnhof.se. [155.4.221.67]) by smtp.gmail.com with ESMTPSA id a79sm7450069ljb.46.2016.12.30.04.48.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Dec 2016 04:48:16 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Jaehoon Chung , Adrian Hunter , Linus Walleij Subject: [PATCH 11/21] mmc: core: First step in cleaning up public mmc header files Date: Fri, 30 Dec 2016 13:47:24 +0100 Message-Id: <1483102054-1752-12-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1483102054-1752-1-git-send-email-ulf.hansson@linaro.org> References: <1483102054-1752-1-git-send-email-ulf.hansson@linaro.org> This is the first step in cleaning up the public mmc header files. In this change we makes sure each header file builds standalone, as that helps to resolve dependencies. While changing this, it also seems reasonable to stop including other headers from inside a header itself which it don't depend upon. Additionally, in some cases such dependencies are better resolved by forward declaring the needed struct. Signed-off-by: Ulf Hansson --- include/linux/mmc/card.h | 2 -- include/linux/mmc/core.h | 3 +-- include/linux/mmc/host.h | 9 ++------- include/linux/mmc/mmc.h | 2 ++ include/linux/mmc/slot-gpio.h | 3 +++ 5 files changed, 8 insertions(+), 11 deletions(-) -- 1.9.1 diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 00449e5..ca64f5b 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -11,7 +11,6 @@ #define LINUX_MMC_CARD_H #include -#include #include struct mmc_cid { @@ -206,7 +205,6 @@ struct sdio_cis { }; struct mmc_host; -struct mmc_ios; struct sdio_func; struct sdio_func_tuple; diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index e33cc74..64e2ddf 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -8,10 +8,9 @@ #ifndef LINUX_MMC_CORE_H #define LINUX_MMC_CORE_H -#include #include +#include -struct request; struct mmc_data; struct mmc_request; diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 8bc8841..8d38c76 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -10,16 +10,12 @@ #ifndef LINUX_MMC_HOST_H #define LINUX_MMC_HOST_H -#include -#include -#include #include #include #include #include #include -#include #include struct mmc_ios { @@ -82,6 +78,8 @@ struct mmc_ios { bool enhanced_strobe; /* hs400es selection */ }; +struct mmc_host; + struct mmc_host_ops { /* * It is optional for the host to implement pre_req and post_req in @@ -162,9 +160,6 @@ struct mmc_host_ops { unsigned int direction, int blk_size); }; -struct mmc_card; -struct device; - struct mmc_async_req { /* active mmc request */ struct mmc_request *mrq; diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index a074082..261772e 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h @@ -24,6 +24,8 @@ #ifndef LINUX_MMC_MMC_H #define LINUX_MMC_MMC_H +#include + /* Standard MMC commands (4.1) type argument response */ /* class 1 */ #define MMC_GO_IDLE_STATE 0 /* bc */ diff --git a/include/linux/mmc/slot-gpio.h b/include/linux/mmc/slot-gpio.h index a7972cd..82f0d28 100644 --- a/include/linux/mmc/slot-gpio.h +++ b/include/linux/mmc/slot-gpio.h @@ -11,6 +11,9 @@ #ifndef MMC_SLOT_GPIO_H #define MMC_SLOT_GPIO_H +#include +#include + struct mmc_host; int mmc_gpio_get_ro(struct mmc_host *host);