diff mbox

[v3,5/9] mmc: core: Export mmc_poll_for_busy()

Message ID 1527646333-133663-1-git-send-email-shawn.lin@rock-chips.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shawn Lin May 30, 2018, 2:12 a.m. UTC
In preparation for reusing it, and no funtional change intended.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

Changes in v3: None
Changes in v2: None

 drivers/mmc/core/mmc_ops.c | 9 +++++----
 drivers/mmc/core/mmc_ops.h | 4 ++++
 2 files changed, 9 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 95b12b8..9ff25c6 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -451,10 +451,10 @@  int mmc_switch_status(struct mmc_card *card)
 	return __mmc_switch_status(card, true);
 }
 
-static int mmc_poll_for_busy(struct mmc_card *card, unsigned int timeout_ms,
-			bool send_status, bool retry_crc_err, bool use_r1b_resp,
-			u32 *resp_status, bool check_busy(u32 device_status),
-			bool poll_for_switch)
+int mmc_poll_for_busy(struct mmc_card *card, unsigned int timeout_ms,
+		      bool send_status, bool retry_crc_err, bool use_r1b_resp,
+		      u32 *resp_status, bool check_busy(u32 device_status),
+		      bool poll_for_switch)
 {
 	struct mmc_host *host = card->host;
 	int err;
@@ -523,6 +523,7 @@  static int mmc_poll_for_busy(struct mmc_card *card, unsigned int timeout_ms,
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(mmc_poll_for_busy);
 
 static inline bool mmc_switch_in_prg_state(u32 status)
 {
diff --git a/drivers/mmc/core/mmc_ops.h b/drivers/mmc/core/mmc_ops.h
index a1390d4..8830c1d 100644
--- a/drivers/mmc/core/mmc_ops.h
+++ b/drivers/mmc/core/mmc_ops.h
@@ -33,6 +33,10 @@ 
 int mmc_interrupt_hpi(struct mmc_card *card);
 int mmc_can_ext_csd(struct mmc_card *card);
 int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd);
+int mmc_poll_for_busy(struct mmc_card *card, unsigned int timeout_ms,
+		      bool send_status, bool retry_crc_err, bool use_r1b_resp,
+		      u32 *resp_status, bool check_busy(u32 device_status),
+		      bool poll_for_switch);
 int mmc_switch_status(struct mmc_card *card);
 int __mmc_switch_status(struct mmc_card *card, bool crc_err_fatal);
 int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,