From patchwork Thu Aug 3 01:44:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 109283 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp156222qge; Wed, 2 Aug 2017 18:45:24 -0700 (PDT) X-Received: by 10.99.47.66 with SMTP id v63mr62910pgv.4.1501724724173; Wed, 02 Aug 2017 18:45:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501724724; cv=none; d=google.com; s=arc-20160816; b=T/hA29pUmEt3mWgJCVUzRTm1Xl+wp6Ac5mqU718dATae48AXwn3Kcxo58XVh3ZYcsS D3oGgA1iw9mjtGuX+0W7KyOxHWqXgYigcHcpaY5rzYhpYSBa43tdGZ/JXWU4sVvXeuBh dH6R5jyHRDsdsOTg/k2p4Eu2rVKHRTs/AQsxeBPddvHU9kfDe8FGCBXB5vVVk/sQp6t9 Wo3/38YTIOCu9yR8RupddutcqG9eg2GKSNV4sK3aZDMmR0xF03EAC5+cBA7PIFrw5124 dtRc2/OQ08BL9dp3adbLNRiT44ndZ9jmsMn1bhgcWDvl8S5OXcU1i9Yu1AaNhC0UZn72 Zf+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=M41oJd7A/SD4nSYVy1Ap5whEe3lcLnPDrvjFIpk6em4=; b=gkXwFfsQCyG4Jhim9AXi4x+cKjzUbShBqsD8EUxszYUQo9iKTrLqLIiL0Mmqm3hJFT A84vEA7FRMOqLHKb0qEVNZEj+rppps6AZG6pscTcUKaDer03lfsXetUR2hXxi8ts/7E2 0Z+gC1PRvooZy8iXm0bDEqNL1uXZXN9NyzGUyge+QZYTe7jy8O2cwKpgbkR9Ou3sUTAe +Z44ahFnD9Hf1Cl6vMh/2O8iHtGwquHOMIghPIkN43HEJfVGuq7EXEFKs6lnzxLqrKx9 Zm2ihlsStUz4DPV0JVM4ro58MEkTxKiLJHStIjhuCBIrKuQi4V9Gt7AMrnFQAPE1yIv9 K8QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.b=rNdwxVz5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8si20703549pga.596.2017.08.02.18.45.23; Wed, 02 Aug 2017 18:45:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.b=rNdwxVz5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752074AbdHCBpI (ORCPT + 25 others); Wed, 2 Aug 2017 21:45:08 -0400 Received: from conuserg-08.nifty.com ([210.131.2.75]:27879 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751206AbdHCBpE (ORCPT ); Wed, 2 Aug 2017 21:45:04 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id v731iOVq012846; Thu, 3 Aug 2017 10:44:27 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com v731iOVq012846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1501724667; bh=M41oJd7A/SD4nSYVy1Ap5whEe3lcLnPDrvjFIpk6em4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rNdwxVz5YqZ547llH9p+goomivTHzOVIVNF4RBZt9jZxz3u1XG2A3R58MgIv8GzhV W4Lkui+D0DU8EnhM0+bRtzB/sbx2FCwy7nMfQVDSfAcziYVOYRo2yLgo3rWoT7lLND 9/mYKaIEw8CiTmcybkzkjMR0dgH/RhIIffYekPYqhw84sHsQ0+2U12Hs3aJnLfgVkf HF9czW/G15AgysPBLNiXNQ5u8OWiB93d/09ioOzoeux0/XftlGxkHFv5o2jRjXLAFE XEcnCB1nsQeEaafrZJwr0Qmoh126Df0ptR7uyEaG6F02VhQbfbDQl2zB3paqUpzXUO 54p2AkRaUUIMg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mmc@vger.kernel.org Cc: Piotr Sroka , Adrian Hunter , Masahiro Yamada , linux-kernel@vger.kernel.org, Ulf Hansson Subject: [PATCH v2 2/4] mmc: sdhci: remove #indef CONFIG_PM around function declarations Date: Thu, 3 Aug 2017 10:44:14 +0900 Message-Id: <1501724656-12435-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501724656-12435-1-git-send-email-yamada.masahiro@socionext.com> References: <1501724656-12435-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need not surround declarations with #ifdef. Besides, drivers may want to call these from PM callbacks marked with __maybe_unused. Signed-off-by: Masahiro Yamada --- Changes in v2: - Newly added drivers/mmc/host/sdhci.h | 4 ---- 1 file changed, 4 deletions(-) -- 2.7.4 diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 0469fa191493..773b38127da2 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -709,15 +709,11 @@ void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios); int sdhci_start_signal_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios); void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable); - -#ifdef CONFIG_PM int sdhci_suspend_host(struct sdhci_host *host); int sdhci_resume_host(struct sdhci_host *host); void sdhci_enable_irq_wakeups(struct sdhci_host *host); int sdhci_runtime_suspend_host(struct sdhci_host *host); int sdhci_runtime_resume_host(struct sdhci_host *host); -#endif - void sdhci_cqe_enable(struct mmc_host *mmc); void sdhci_cqe_disable(struct mmc_host *mmc, bool recovery); bool sdhci_cqe_irq(struct sdhci_host *host, u32 intmask, int *cmd_error, From patchwork Thu Aug 3 01:44:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 109282 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp156089qge; Wed, 2 Aug 2017 18:45:12 -0700 (PDT) X-Received: by 10.84.224.142 with SMTP id s14mr1492plj.353.1501724712441; Wed, 02 Aug 2017 18:45:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501724712; cv=none; d=google.com; s=arc-20160816; b=aUDtRaAebBCCrf1zcXviGWwdDQyGouwtACvKZl2Q6imHOHYlV3vJZl9zVtqMw3EPGE kO5UmF9Jj4A/oAomkiBnwEy1r7Zut1U/X0sh/M1nrqTLwZ8sXDj+hPZQZ9Cad6zxEUsc LeHJ3LaP3/mCuWR67/fLCYN8DWCIc4HDLDustAr1KTGXmAF7B2QvTw28b0XGs6RUej0N 49Yh06uVLMrFbGYdyESJadThxg6+oAWkXBSG+Gl6kWCswc+5v/h3SuwrisO2R89R13BG m65AgduS6ZjzOu5dzufcpi0caeWcWgKDin/xHWbdLk4OPOxFsz/j2lzv2oA08yJpTp6c nnfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=LvXCRXTZUuLbDha+nc+6GvOiY4qtisO5g9HYDN/J+8A=; b=W6m5V7QvhoywQIDm1v0Sus+EiSbTTX9QA1GsMFUVI5lLFpS2BgLMbigKs0gKNTUYK6 XMIXczdqSWYHASE0UBi8YXSloROEyueTSd68lBDpNMrTVNZJCa684/8hUUBlOdC1lrnw PUsUOai0g259SPr8mLwYdPDE+EsmKeQ6tYKVFsfvxeXi+gUPPevl1kTQxYv4S0/oUn66 u4660a0uhFe9hkZwFCiKHpusUJzKI2fbWo+sh7YMoZwjAed2TRk8FW4k6HEgX7j2Z6/g rxjc5YSA6A6cggFd2m68YxO/O19rgVks0BfxzJ0wLHMZbiHxUq/EMmZpHIcvE/TzgP75 x2TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.b=o5sx4uTV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r2si14940241pli.524.2017.08.02.18.45.12; Wed, 02 Aug 2017 18:45:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.b=o5sx4uTV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752097AbdHCBpJ (ORCPT + 25 others); Wed, 2 Aug 2017 21:45:09 -0400 Received: from conuserg-08.nifty.com ([210.131.2.75]:27880 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751345AbdHCBpE (ORCPT ); Wed, 2 Aug 2017 21:45:04 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id v731iOVr012846; Thu, 3 Aug 2017 10:44:27 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com v731iOVr012846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1501724668; bh=LvXCRXTZUuLbDha+nc+6GvOiY4qtisO5g9HYDN/J+8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o5sx4uTVLtvqLUVMzW5OMHe9oRz0H9T8WXhpqFPGZYMcncW19GN4BaijQ+ZULYArl zeLmke0Cq40VpOILrBl94k09cvnxFAnAbXMEH+HEOOLLZZe7piWJO2STlksy3WzAzr CD9+UtY3GBvRBnpi3e8PnnpSDaRzzObEVr16jtwxsjQkERp8ithwAbDYmU993QmV7i uXiCro0t6zvVdy+HlTkiXO1E0u3+NmbxLO/ZuKnFj5IyALGgNMAqNn/iqZRp/DTbp3 FgXR0CWz6O1e9XuM/ipGzTcnLVjCz0+QvaT78DSCpZ7PmAXcuK+bMJkNL24HnppTuV qlHzU1vFWmF+A== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mmc@vger.kernel.org Cc: Piotr Sroka , Adrian Hunter , Masahiro Yamada , linux-kernel@vger.kernel.org, Ulf Hansson Subject: [PATCH v2 3/4] mmc: sdhci-pltfm: export sdhci_pltfm_suspend/resume Date: Thu, 3 Aug 2017 10:44:15 +0900 Message-Id: <1501724656-12435-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501724656-12435-1-git-send-email-yamada.masahiro@socionext.com> References: <1501724656-12435-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This will be useful when drivers want to reuse only the suspend/resume callbacks instead of whole of sdhci_pltfm_pmops. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mmc/host/sdhci-pltfm.c | 6 ++++-- drivers/mmc/host/sdhci-pltfm.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index be9a79d62e22..a34eacac612f 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -209,7 +209,7 @@ int sdhci_pltfm_unregister(struct platform_device *pdev) EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister); #ifdef CONFIG_PM_SLEEP -static int sdhci_pltfm_suspend(struct device *dev) +int sdhci_pltfm_suspend(struct device *dev) { struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -226,8 +226,9 @@ static int sdhci_pltfm_suspend(struct device *dev) return 0; } +EXPORT_SYMBOL_GPL(sdhci_pltfm_suspend); -static int sdhci_pltfm_resume(struct device *dev) +int sdhci_pltfm_resume(struct device *dev) { struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -239,6 +240,7 @@ static int sdhci_pltfm_resume(struct device *dev) return sdhci_resume_host(host); } +EXPORT_SYMBOL_GPL(sdhci_pltfm_resume); #endif const struct dev_pm_ops sdhci_pltfm_pmops = { diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h index 957839d0fe37..1e91fb1c020e 100644 --- a/drivers/mmc/host/sdhci-pltfm.h +++ b/drivers/mmc/host/sdhci-pltfm.h @@ -109,6 +109,8 @@ static inline void *sdhci_pltfm_priv(struct sdhci_pltfm_host *host) return host->private; } +int sdhci_pltfm_suspend(struct device *dev); +int sdhci_pltfm_resume(struct device *dev); extern const struct dev_pm_ops sdhci_pltfm_pmops; #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */