From patchwork Fri Jan 13 13:14:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 91408 Delivered-To: patches@linaro.org Received: by 10.182.3.34 with SMTP id 2csp131094obz; Fri, 13 Jan 2017 05:14:51 -0800 (PST) X-Received: by 10.25.92.153 with SMTP id u25mr6533138lfi.10.1484313290978; Fri, 13 Jan 2017 05:14:50 -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 r128si1599029lfr.351.2017.01.13.05.14.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jan 2017 05:14:50 -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 sp=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x22d.google.com with SMTP id m78so37127864lfg.2 for ; Fri, 13 Jan 2017 05:14:50 -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=JlnS64kxBO/1tdckhQR7yX2uPU59pMlX5A6SSoFcIPHUJVwg9LjPaH7GD7H0Aedsrj 5P3G2UzmcPdPJeB1Srrrc5Csk5duxUKmAtTkQdwPlIF9nQOCV2ut1icWv4dnFpN3ywtu 63VVzfHXla2Ubd7MqAecpCdB8gVEtWAs3vsWs= 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=qWReIQEDfsruucJH909if5NdcddZjNwMaLa4TVLfTZYZUUVIHjyxDNlH3djlr8hRXQ wxm//nd+VfeUZzcZI8UREu08CdT+sEPA32AWGmt8D+cbpT+xKvRJ0isTO7f1xb3tra/W ioiAYXAaBFBIlirMDPyI3lfRm9HlMSUOhrvxNpDnAggUpeag4iyXjfd6McqmfvnxiYCO rfXpW2Djkus0TvH7UFZ2HWZgpvnJoUVtPxw4GjZdlBg6BeJkn+ib6UM7003ETHBPaRzU nCwQZIeKNGI5qbubO0Gd5HzXgTtbIz1TYrzVq4lOwQZNJHp/GABBuVRA99I12gHeeMGc gm1Q== X-Gm-Message-State: AIkVDXJpLzx6XtFO5xrtJggbu8k0MDhemKZohgTzi+X3SpkvscMBrfbTigDezIl/8rYwY8sOFBY= X-Received: by 10.25.204.197 with SMTP id c188mr5135462lfg.107.1484313290496; Fri, 13 Jan 2017 05:14:50 -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 l67sm2931452lfb.15.2017.01.13.05.14.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jan 2017 05:14:49 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Jaehoon Chung , Adrian Hunter , Linus Walleij Subject: [PATCH v3 05/15] mmc: core: First step in cleaning up public mmc header files Date: Fri, 13 Jan 2017 14:14:06 +0100 Message-Id: <1484313256-25993-6-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484313256-25993-1-git-send-email-ulf.hansson@linaro.org> References: <1484313256-25993-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 Reviewed-by: Shawn Lin 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);