summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-05-01 11:36:15 -0600
committerSimon Glass <sjg@chromium.org>2016-05-17 09:54:43 -0600
commit3c457f4d2e47cc91385abe15d3c825d0ce1a2b6f (patch)
treed2b388a60f961ec40b4ba25ddfef6503fe679c21
parent74001a2570ccbc120366e66dd40e8c66e3a6820c (diff)
downloadtalos-obmc-uboot-3c457f4d2e47cc91385abe15d3c825d0ce1a2b6f.tar.gz
talos-obmc-uboot-3c457f4d2e47cc91385abe15d3c825d0ce1a2b6f.zip
dm: mmc: Drop the get_dev() function
This function is implemented by the legacy block functions now. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--cmd/mmc.c2
-rw-r--r--disk/part.c1
-rw-r--r--drivers/mmc/mmc.c16
-rw-r--r--include/part.h2
4 files changed, 3 insertions, 18 deletions
diff --git a/cmd/mmc.c b/cmd/mmc.c
index c5454bf2e1..4f251870ee 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -432,7 +432,7 @@ static int do_mmc_part(cmd_tbl_t *cmdtp, int flag,
if (!mmc)
return CMD_RET_FAILURE;
- mmc_dev = mmc_get_dev(curr_device);
+ mmc_dev = blk_get_devnum_by_type(IF_TYPE_MMC, curr_device);
if (mmc_dev != NULL && mmc_dev->type != DEV_TYPE_UNKNOWN) {
part_print(mmc_dev);
return CMD_RET_SUCCESS;
diff --git a/disk/part.c b/disk/part.c
index bf224b2c52..e70bef5aab 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -37,7 +37,6 @@ const struct block_drvr block_drvr[] = {
#if defined(CONFIG_MMC)
{
.name = "mmc",
- .get_dev = mmc_get_dev,
.select_hwpart = mmc_select_hwpart,
},
#endif
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 024368c727..185d7b2a8e 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1582,7 +1582,7 @@ void mmc_destroy(struct mmc *mmc)
free(mmc);
}
-static int mmc_get_devp(int dev, struct blk_desc **descp)
+static int mmc_get_dev(int dev, struct blk_desc **descp)
{
struct mmc *mmc = find_mmc_device(dev);
int ret;
@@ -1598,18 +1598,6 @@ static int mmc_get_devp(int dev, struct blk_desc **descp)
return 0;
}
-#ifdef CONFIG_PARTITIONS
-struct blk_desc *mmc_get_dev(int dev)
-{
- struct blk_desc *desc;
-
- if (mmc_get_devp(dev, &desc))
- return NULL;
-
- return desc;
-}
-#endif
-
/* board-specific MMC power initializations. */
__weak void board_mmc_power_init(void)
{
@@ -1987,5 +1975,5 @@ U_BOOT_LEGACY_BLK(mmc) = {
.if_typename = "mmc",
.if_type = IF_TYPE_MMC,
.max_devs = -1,
- .get_dev = mmc_get_devp,
+ .get_dev = mmc_get_dev,
};
diff --git a/include/part.h b/include/part.h
index f09b794d61..1535930b90 100644
--- a/include/part.h
+++ b/include/part.h
@@ -75,7 +75,6 @@ typedef struct disk_partition {
struct blk_desc *blk_get_dev(const char *ifname, int dev);
struct blk_desc *sata_get_dev(int dev);
struct blk_desc *scsi_get_dev(int dev);
-struct blk_desc *mmc_get_dev(int dev);
/**
* mmc_select_hwpart() - Select the MMC hardware partiion on an MMC device
@@ -175,7 +174,6 @@ static inline struct blk_desc *blk_get_dev(const char *ifname, int dev)
{ return NULL; }
static inline struct blk_desc *sata_get_dev(int dev) { return NULL; }
static inline struct blk_desc *scsi_get_dev(int dev) { return NULL; }
-static inline struct blk_desc *mmc_get_dev(int dev) { return NULL; }
static inline int mmc_select_hwpart(int dev_num, int hwpart) { return -1; }
static inline struct blk_desc *systemace_get_dev(int dev) { return NULL; }
static inline struct blk_desc *mg_disk_get_dev(int dev) { return NULL; }
OpenPOWER on IntegriCloud