dm: mmc: Convert sdhci to support CONFIG_BLK
authorSimon Glass <sjg@chromium.org>
Sat, 14 May 2016 20:03:04 +0000 (14:03 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 27 May 2016 16:23:08 +0000 (10:23 -0600)
Update sdhci.c so that it works with driver model enabled for block devices.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/mmc/sdhci.c

index ef7e6150f9339d74ab6b51a17b918d0dbbda5196..5c71ab8d058e7a24b2186cd92573b7661932a672 100644 (file)
@@ -137,7 +137,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
        int trans_bytes = 0, is_aligned = 1;
        u32 mask, flags, mode;
        unsigned int time = 0, start_addr = 0;
-       int mmc_dev = mmc->block_dev.devnum;
+       int mmc_dev = mmc_get_blk_desc(mmc)->devnum;
        unsigned start = get_timer(0);
 
        /* Timeout unit - ms */