diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2007-02-20 09:04:34 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2007-02-20 09:04:34 +0100 |
commit | 735dd97b1b20e777d059c7b389fe9d70cd3f80c7 (patch) | |
tree | eb62a0abe8bdea88c563380c302a88fa64eff151 /common/cmd_fat.c | |
parent | 620d3c9a14affca29a5c4e575e9f355c2bd4aed2 (diff) | |
download | u-boot-imx-735dd97b1b20e777d059c7b389fe9d70cd3f80c7.zip u-boot-imx-735dd97b1b20e777d059c7b389fe9d70cd3f80c7.tar.gz u-boot-imx-735dd97b1b20e777d059c7b389fe9d70cd3f80c7.tar.bz2 |
[PATCH 1_4] Merge common get_dev() routines for block devices
Each of the filesystem drivers duplicate the get_dev routine. This change
merges them into a single function in part.c
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'common/cmd_fat.c')
-rw-r--r-- | common/cmd_fat.c | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/common/cmd_fat.c b/common/cmd_fat.c index 6844c10..afaf299 100644 --- a/common/cmd_fat.c +++ b/common/cmd_fat.c @@ -29,6 +29,7 @@ #include <s_record.h> #include <net.h> #include <ata.h> +#include <part.h> #if (CONFIG_COMMANDS & CFG_CMD_FAT) @@ -37,42 +38,6 @@ #include <fat.h> -block_dev_desc_t *get_dev (char* ifname, int dev) -{ -#if (CONFIG_COMMANDS & CFG_CMD_IDE) - if (strncmp(ifname,"ide",3)==0) { - extern block_dev_desc_t * ide_get_dev(int dev); - return(ide_get_dev(dev)); - } -#endif -#if (CONFIG_COMMANDS & CFG_CMD_SCSI) - if (strncmp(ifname,"scsi",4)==0) { - extern block_dev_desc_t * scsi_get_dev(int dev); - return(scsi_get_dev(dev)); - } -#endif -#if ((CONFIG_COMMANDS & CFG_CMD_USB) && defined(CONFIG_USB_STORAGE)) - if (strncmp(ifname,"usb",3)==0) { - extern block_dev_desc_t * usb_stor_get_dev(int dev); - return(usb_stor_get_dev(dev)); - } -#endif -#if defined(CONFIG_MMC) - if (strncmp(ifname,"mmc",3)==0) { - extern block_dev_desc_t * mmc_get_dev(int dev); - return(mmc_get_dev(dev)); - } -#endif -#if defined(CONFIG_SYSTEMACE) - if (strcmp(ifname,"ace")==0) { - extern block_dev_desc_t * systemace_get_dev(int dev); - return(systemace_get_dev(dev)); - } -#endif - return NULL; -} - - int do_fat_fsload (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { long size; |