summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-05-01 11:36:16 -0600
committerSimon Glass <sjg@chromium.org>2016-05-17 09:54:43 -0600
commitedd82ab3547e27b4c1ab1ee7e620f982db9126ad (patch)
tree11971a5c4599e85063b6bf1d46528d78491e6318
parent3c457f4d2e47cc91385abe15d3c825d0ce1a2b6f (diff)
downloadblackbird-obmc-uboot-edd82ab3547e27b4c1ab1ee7e620f982db9126ad.tar.gz
blackbird-obmc-uboot-edd82ab3547e27b4c1ab1ee7e620f982db9126ad.zip
dm: scsi: 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--common/scsi.c7
-rw-r--r--common/spl/spl_sata.c2
-rw-r--r--disk/part.c2
-rw-r--r--include/part.h2
4 files changed, 2 insertions, 11 deletions
diff --git a/common/scsi.c b/common/scsi.c
index a336a10753..5b6531f01b 100644
--- a/common/scsi.c
+++ b/common/scsi.c
@@ -327,13 +327,6 @@ void scsi_init(void)
}
#endif
-#ifdef CONFIG_PARTITIONS
-struct blk_desc *scsi_get_dev(int dev)
-{
- return (dev < CONFIG_SYS_SCSI_MAX_DEVICE) ? &scsi_dev_desc[dev] : NULL;
-}
-#endif
-
/* copy src to dest, skipping leading and trailing blanks
* and null terminate the string
*/
diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c
index 1719946ec5..9d8cc7c2dd 100644
--- a/common/spl/spl_sata.c
+++ b/common/spl/spl_sata.c
@@ -34,7 +34,7 @@ int spl_sata_load_image(void)
} else {
/* try to recognize storage devices immediately */
scsi_scan(0);
- stor_dev = scsi_get_dev(0);
+ stor_dev = blk_get_devnum_by_type(IF_TYPE_SCSI, 0);
if (!stor_dev)
return -ENODEV;
}
diff --git a/disk/part.c b/disk/part.c
index e70bef5aab..67cb6c0c0b 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -29,7 +29,7 @@ const struct block_drvr block_drvr[] = {
{.name = "sata", .get_dev = sata_get_dev, },
#endif
#if defined(CONFIG_SCSI)
- { .name = "scsi", .get_dev = scsi_get_dev, },
+ { .name = "scsi", },
#endif
#if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE)
{ .name = "usb", },
diff --git a/include/part.h b/include/part.h
index 1535930b90..ecb049f9a8 100644
--- a/include/part.h
+++ b/include/part.h
@@ -74,7 +74,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);
/**
* mmc_select_hwpart() - Select the MMC hardware partiion on an MMC device
@@ -173,7 +172,6 @@ extern const struct block_drvr block_drvr[];
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 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