diff mbox series

[8/9] mmc: core: Drop mmc_all_send_cid() and use mmc_send_cxd_native() instead

Message ID 1496928465-25004-9-git-send-email-ulf.hansson@linaro.org
State New
Headers show
Series mmc: core: Some trivial re-factoring and cleanups | expand

Commit Message

Ulf Hansson June 8, 2017, 1:27 p.m. UTC
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

---
 drivers/mmc/core/mmc_ops.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

-- 
2.7.4

Comments

Linus Walleij June 9, 2017, 1:32 p.m. UTC | #1
On Thu, Jun 8, 2017 at 3:27 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:

> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>


Reviewed-by: Linus Walleij <linus.walleij@linaro.org>


Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 50571a6..b60b4da 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -207,24 +207,6 @@  int mmc_send_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr)
 	return err;
 }
 
-static int mmc_all_send_cid(struct mmc_host *host, u32 *cid)
-{
-	int err;
-	struct mmc_command cmd = {};
-
-	cmd.opcode = MMC_ALL_SEND_CID;
-	cmd.arg = 0;
-	cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR;
-
-	err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
-	if (err)
-		return err;
-
-	memcpy(cid, cmd.resp, sizeof(u32) * 4);
-
-	return 0;
-}
-
 int mmc_set_relative_addr(struct mmc_card *card)
 {
 	struct mmc_command cmd = {};
@@ -360,7 +342,7 @@  int mmc_send_cid(struct mmc_host *host, u32 *cid)
 	if (mmc_host_is_spi(host))
 		return mmc_spi_send_cid(host, cid);
 
-	return mmc_all_send_cid(host, cid);
+	return mmc_send_cxd_native(host, 0, cid, MMC_ALL_SEND_CID);
 }
 
 int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd)