From patchwork Wed Jan 11 11:51:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 90851 Delivered-To: patches@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1081624qgi; Wed, 11 Jan 2017 03:51:36 -0800 (PST) X-Received: by 10.25.217.17 with SMTP id q17mr2634068lfg.178.1484135496307; Wed, 11 Jan 2017 03:51:36 -0800 (PST) Return-Path: Received: from mail-lf0-x232.google.com (mail-lf0-x232.google.com. [2a00:1450:4010:c07::232]) by mx.google.com with ESMTPS id m81si3356503lfm.213.2017.01.11.03.51.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 03:51:36 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::232 as permitted sender) client-ip=2a00:1450:4010:c07::232; 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::232 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x232.google.com with SMTP id m78so113817737lfg.2 for ; Wed, 11 Jan 2017 03:51:36 -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=WAWG0cJtlt/ztF2IYUGdBbG9D0pVzSPgiwip+t5RchbUEsyu3kb+sACiV6FuGn0UMg 3iK9V3JU8IpK7vWyhmITBBr0MGIbAvKPDGGylTGbI5nPNJ3j8wGmFqe8yjHH4QsIvxuw c2jxJWbPAc4Xc8mcI45NC3ETrYbxiwDfB1jk8= 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=ZbrF9WGD95O3kCf6/iAdIP7ebaxjBhwTTZaVHjEXIiGYTvEHEAOpDwqm5sNke+Y9FK sZMPup6apuJTT3k/D77ChOE1ofyxlzGgnOo9Cy7tpbsqJmy8orMCFpBLItDyOae12Dyh qprAva37I+KXsgG7QCe7uSqJhbjwo7sYj394zlGDR372lTu31URV0HKScwiZA33sMVE5 5Dr9YbLkMInbTjCp8YKMeRBojU1IY+Ml2UXq5u1PbYxIXyGwu/ItVBkUqiKSTXKVptq1 pbqZKPf2mwW0FqXno3W5tFHIB/EiLM9gyAm7I+P6hGTTY31ox3VvzrNv4QOTeRjnNxIX ULMQ== X-Gm-Message-State: AIkVDXKTOG1fuW25yorMq7015gxCybSLz3pIb7+y1gHZybXQbXfENUZbBEAxyHPE+8VcCt40rYg= X-Received: by 10.46.76.1 with SMTP id z1mr3124370lja.41.1484135495876; Wed, 11 Jan 2017 03:51:35 -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 87sm958768lft.27.2017.01.11.03.51.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Jan 2017 03:51:34 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Jaehoon Chung , Adrian Hunter , Linus Walleij Subject: [PATCH v2 02/12] mmc: core: First step in cleaning up public mmc header files Date: Wed, 11 Jan 2017 12:51:08 +0100 Message-Id: <1484135478-2077-3-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484135478-2077-1-git-send-email-ulf.hansson@linaro.org> References: <1484135478-2077-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);