]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
dm: scsi: Drop the get_dev() function
authorSimon Glass <sjg@chromium.org>
Sun, 1 May 2016 17:36:16 +0000 (11:36 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 17 May 2016 15:54:43 +0000 (09:54 -0600)
This function is implemented by the legacy block functions now. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/scsi.c
common/spl/spl_sata.c
disk/part.c
include/part.h

index a336a10753c5432de36bf000a9ad61f0814c4690..5b6531f01b1c9032782d0f49fe52430717153307 100644 (file)
@@ -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
  */
index 1719946ec5f0d7fbc0a7e2ec2d753ed0b0a640a6..9d8cc7c2ddf7a75eb9da4c61f1ca38216277f153 100644 (file)
@@ -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;
        }
index e70bef5aabed0de6349d031e4a7f80cea7290d0f..67cb6c0c0b63dba52af3db0f300e0d2b85f9be5c 100644 (file)
@@ -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", },
index 1535930b90df37a9d7ea07b0ebd911b6e4c25c41..ecb049f9a8fa4483e289545f352a202c204deb7a 100644 (file)
@@ -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; }