From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Victor Shih <victor.shih@genesyslogic.com.tw>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/6] mmc: sdhci: Use EXPORT_PM_FN_NS_GPL() for exporting PM functions
Date: Fri, 1 Nov 2024 12:11:31 +0200 [thread overview]
Message-ID: <20241101101441.3518612-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20241101101441.3518612-1-andriy.shevchenko@linux.intel.com>
Switch from ugly ifdeffery to using EXPORT_PM_FN_NS_GPL()
for exporting PM functions. This helps cleaning up the other
SDHCI drivers in the future.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/mmc/host/sdhci.c | 14 ++++----------
drivers/mmc/host/sdhci.h | 2 --
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index f4a7733a8ad2..2214280ca5fb 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3733,8 +3733,6 @@ EXPORT_SYMBOL_GPL(sdhci_thread_irq);
* *
\*****************************************************************************/
-#ifdef CONFIG_PM
-
static bool sdhci_cd_irq_can_wakeup(struct sdhci_host *host)
{
return mmc_card_is_removable(host->mmc) &&
@@ -3814,8 +3812,7 @@ int sdhci_suspend_host(struct sdhci_host *host)
return 0;
}
-
-EXPORT_SYMBOL_GPL(sdhci_suspend_host);
+EXPORT_PM_FN_GPL(sdhci_suspend_host);
int sdhci_resume_host(struct sdhci_host *host)
{
@@ -3853,8 +3850,7 @@ int sdhci_resume_host(struct sdhci_host *host)
return ret;
}
-
-EXPORT_SYMBOL_GPL(sdhci_resume_host);
+EXPORT_PM_FN_GPL(sdhci_resume_host);
int sdhci_runtime_suspend_host(struct sdhci_host *host)
{
@@ -3876,7 +3872,7 @@ int sdhci_runtime_suspend_host(struct sdhci_host *host)
return 0;
}
-EXPORT_SYMBOL_GPL(sdhci_runtime_suspend_host);
+EXPORT_PM_FN_GPL(sdhci_runtime_suspend_host);
int sdhci_runtime_resume_host(struct sdhci_host *host, int soft_reset)
{
@@ -3927,9 +3923,7 @@ int sdhci_runtime_resume_host(struct sdhci_host *host, int soft_reset)
return 0;
}
-EXPORT_SYMBOL_GPL(sdhci_runtime_resume_host);
-
-#endif /* CONFIG_PM */
+EXPORT_PM_FN_GPL(sdhci_runtime_resume_host);
/*****************************************************************************\
* *
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index cd0e35a80542..4ee2695b0202 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -874,12 +874,10 @@ irqreturn_t sdhci_thread_irq(int irq, void *dev_id);
void sdhci_adma_write_desc(struct sdhci_host *host, void **desc,
dma_addr_t addr, int len, unsigned int cmd);
-#ifdef CONFIG_PM
int sdhci_suspend_host(struct sdhci_host *host);
int sdhci_resume_host(struct sdhci_host *host);
int sdhci_runtime_suspend_host(struct sdhci_host *host);
int sdhci_runtime_resume_host(struct sdhci_host *host, int soft_reset);
-#endif
void sdhci_cqe_enable(struct mmc_host *mmc);
void sdhci_cqe_disable(struct mmc_host *mmc, bool recovery);
--
2.43.0.rc1.1336.g36b5255a03ac
next prev parent reply other threads:[~2024-11-01 10:14 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 10:11 [PATCH v2 0/6] mmc: sdhci-acpi: A few cleanups Andy Shevchenko
2024-11-01 10:11 ` Andy Shevchenko [this message]
2024-12-09 10:38 ` [PATCH v2 1/6] mmc: sdhci: Use EXPORT_PM_FN_NS_GPL() for exporting PM functions Adrian Hunter
2024-12-09 16:36 ` Andy Shevchenko
2024-12-09 17:11 ` Adrian Hunter
2025-01-16 15:14 ` Andy Shevchenko
2025-01-16 16:55 ` Richard Fitzgerald
2024-11-01 10:11 ` [PATCH v2 2/6] mmc: sdhci-acpi: Switch to SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() and pm_ptr() Andy Shevchenko
2024-12-09 11:00 ` Adrian Hunter
2024-11-01 10:11 ` [PATCH v2 3/6] mmc: sdhci-acpi: Remove not so useful error message Andy Shevchenko
2024-12-09 11:05 ` Adrian Hunter
2024-11-01 10:11 ` [PATCH v2 4/6] mmc: sdhci-acpi: Use devm_platform_ioremap_resource() Andy Shevchenko
2024-12-09 11:26 ` Adrian Hunter
2024-11-01 10:11 ` [PATCH v2 5/6] mmc: sdhci-acpi: Tidy up ACPI ID table Andy Shevchenko
2024-12-09 11:29 ` Adrian Hunter
2024-12-09 16:40 ` Andy Shevchenko
2025-01-16 15:16 ` Andy Shevchenko
2024-11-01 10:11 ` [PATCH v2 6/6] mmc: sdhci-acpi: Don't use "proxy" headers Andy Shevchenko
2024-12-09 11:32 ` Adrian Hunter
2024-12-09 16:43 ` Andy Shevchenko
2024-12-02 15:24 ` [PATCH v2 0/6] mmc: sdhci-acpi: A few cleanups Ulf Hansson
2024-12-02 15:31 ` Andy Shevchenko
2024-12-18 15:55 ` Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241101101441.3518612-2-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=adrian.hunter@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=victor.shih@genesyslogic.com.tw \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.