diff options
author | Simon Glass <sjg@chromium.org> | 2016-02-29 15:25:51 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-03-14 15:34:50 -0600 |
commit | bcce53d048de7f41078d25e39aa2f26d752d3658 (patch) | |
tree | 5eb88ab671c7ec923cfb4fe9c0d3dc4715adb93d /cmd | |
parent | 782b97805e9f59cc2b4d3aa67a8a03248e8cd722 (diff) | |
download | u-boot-imx-bcce53d048de7f41078d25e39aa2f26d752d3658.zip u-boot-imx-bcce53d048de7f41078d25e39aa2f26d752d3658.tar.gz u-boot-imx-bcce53d048de7f41078d25e39aa2f26d752d3658.tar.bz2 |
dm: block: Rename device number member dev to devnum
This is a device number, and we want to use 'dev' to mean a driver model
device. Rename the member.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/disk.c | 2 | ||||
-rw-r--r-- | cmd/fat.c | 4 | ||||
-rw-r--r-- | cmd/ide.c | 12 | ||||
-rw-r--r-- | cmd/mmc_spi.c | 4 | ||||
-rw-r--r-- | cmd/reiser.c | 4 | ||||
-rw-r--r-- | cmd/sata.c | 6 | ||||
-rw-r--r-- | cmd/scsi.c | 6 | ||||
-rw-r--r-- | cmd/usb_mass_storage.c | 2 | ||||
-rw-r--r-- | cmd/zfs.c | 2 |
9 files changed, 21 insertions, 21 deletions
@@ -45,7 +45,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, return 1; } - dev = dev_desc->dev; + dev = dev_desc->devnum; bootstage_mark(BOOTSTAGE_ID_IDE_TYPE); printf("\nLoading from %s device %d, partition %d: " @@ -81,7 +81,7 @@ static int do_fat_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, if (part < 0) return 1; - dev = dev_desc->dev; + dev = dev_desc->devnum; if (fat_set_blk_dev(dev_desc, &info) != 0) { printf("\n** Unable to use %s %d:%d for fatinfo **\n", argv[1], dev, part); @@ -118,7 +118,7 @@ static int do_fat_fswrite(cmd_tbl_t *cmdtp, int flag, if (part < 0) return 1; - dev = dev_desc->dev; + dev = dev_desc->devnum; if (fat_set_blk_dev(dev_desc, &info) != 0) { printf("\n** Unable to use %s %d:%d for fatwrite **\n", @@ -418,7 +418,7 @@ void ide_init(void) int led = (IDE_BUS(i) == 0) ? LED_IDE1 : LED_IDE2; ide_dev_desc[i].type = DEV_TYPE_UNKNOWN; ide_dev_desc[i].if_type = IF_TYPE_IDE; - ide_dev_desc[i].dev = i; + ide_dev_desc[i].devnum = i; ide_dev_desc[i].part_type = PART_TYPE_UNKNOWN; ide_dev_desc[i].blksz = 0; ide_dev_desc[i].log2blksz = @@ -551,7 +551,7 @@ static void ide_ident(struct blk_desc *dev_desc) #endif int device; - device = dev_desc->dev; + device = dev_desc->devnum; printf(" Device %d: ", device); ide_led(DEVICE_LED(device), 1); /* LED on */ @@ -716,7 +716,7 @@ static void ide_ident(struct blk_desc *dev_desc) ulong ide_read(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt, void *buffer) { - int device = block_dev->dev; + int device = block_dev->devnum; ulong n = 0; unsigned char c; unsigned char pwrsave = 0; /* power save */ @@ -842,7 +842,7 @@ IDE_READ_E: ulong ide_write(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt, const void *buffer) { - int device = block_dev->dev; + int device = block_dev->devnum; ulong n = 0; unsigned char c; @@ -1308,7 +1308,7 @@ static void atapi_inquiry(struct blk_desc *dev_desc) unsigned char c; int device; - device = dev_desc->dev; + device = dev_desc->devnum; dev_desc->type = DEV_TYPE_UNKNOWN; /* not yet valid */ dev_desc->block_read = atapi_read; @@ -1397,7 +1397,7 @@ static void atapi_inquiry(struct blk_desc *dev_desc) ulong atapi_read(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt, void *buffer) { - int device = block_dev->dev; + int device = block_dev->devnum; ulong n = 0; unsigned char ccb[12]; /* Command descriptor block */ ulong cnt; diff --git a/cmd/mmc_spi.c b/cmd/mmc_spi.c index a2138b8..0c44d06 100644 --- a/cmd/mmc_spi.c +++ b/cmd/mmc_spi.c @@ -72,8 +72,8 @@ static int do_mmc_spi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) printf("Failed to create MMC Device\n"); return 1; } - printf("%s: %d at %u:%u hz %u mode %u\n", mmc->cfg->name, mmc->block_dev.dev, - bus, cs, speed, mode); + printf("%s: %d at %u:%u hz %u mode %u\n", mmc->cfg->name, + mmc->block_dev.devnum, bus, cs, speed, mode); mmc_init(mmc); return 0; diff --git a/cmd/reiser.c b/cmd/reiser.c index a717956..cbdad36 100644 --- a/cmd/reiser.c +++ b/cmd/reiser.c @@ -48,7 +48,7 @@ int do_reiserls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) filename = argv[3]; } - dev = dev_desc->dev; + dev = dev_desc->devnum; PRINTF("Using device %s %d:%d, directory: %s\n", argv[1], dev, part, filename); reiserfs_set_blk_dev(dev_desc, &info); @@ -126,7 +126,7 @@ int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (part < 0) return 1; - dev = dev_desc->dev; + dev = dev_desc->devnum; printf("Loading file \"%s\" from %s device %d%c%c\n", filename, argv[1], dev, @@ -21,13 +21,13 @@ struct blk_desc sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE]; static unsigned long sata_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, void *dst) { - return sata_read(block_dev->dev, start, blkcnt, dst); + return sata_read(block_dev->devnum, start, blkcnt, dst); } static unsigned long sata_bwrite(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, const void *buffer) { - return sata_write(block_dev->dev, start, blkcnt, buffer); + return sata_write(block_dev->devnum, start, blkcnt, buffer); } int __sata_initialize(void) @@ -38,7 +38,7 @@ int __sata_initialize(void) for (i = 0; i < CONFIG_SYS_SATA_MAX_DEVICE; i++) { memset(&sata_dev_desc[i], 0, sizeof(struct blk_desc)); sata_dev_desc[i].if_type = IF_TYPE_SATA; - sata_dev_desc[i].dev = i; + sata_dev_desc[i].devnum = i; sata_dev_desc[i].part_type = PART_TYPE_UNKNOWN; sata_dev_desc[i].type = DEV_TYPE_HARDDISK; sata_dev_desc[i].lba = 0; @@ -99,7 +99,7 @@ void scsi_scan(int mode) scsi_dev_desc[i].revision[0]=0; scsi_dev_desc[i].removable = false; scsi_dev_desc[i].if_type=IF_TYPE_SCSI; - scsi_dev_desc[i].dev=i; + scsi_dev_desc[i].devnum = i; scsi_dev_desc[i].part_type=PART_TYPE_UNKNOWN; scsi_dev_desc[i].block_read=scsi_read; scsi_dev_desc[i].block_write = scsi_write; @@ -379,7 +379,7 @@ int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) static ulong scsi_read(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt, void *buffer) { - int device = block_dev->dev; + int device = block_dev->devnum; lbaint_t start, blks; uintptr_t buf_addr; unsigned short smallblks = 0; @@ -446,7 +446,7 @@ static ulong scsi_read(struct blk_desc *block_dev, lbaint_t blknr, static ulong scsi_write(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt, const void *buffer) { - int device = block_dev->dev; + int device = block_dev->devnum; lbaint_t start, blks; uintptr_t buf_addr; unsigned short smallblks; diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c index 59bb4ee..14eed98 100644 --- a/cmd/usb_mass_storage.c +++ b/cmd/usb_mass_storage.c @@ -100,7 +100,7 @@ static int ums_init(const char *devtype, const char *devnums) ums[ums_count].block_dev = *block_dev; printf("UMS: LUN %d, dev %d, hwpart %d, sector %#x, count %#x\n", - ums_count, ums[ums_count].block_dev.dev, + ums_count, ums[ums_count].block_dev.devnum, ums[ums_count].block_dev.hwpart, ums[ums_count].start_sector, ums[ums_count].num_sectors); @@ -84,7 +84,7 @@ static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] if (part < 0) return 1; - dev = dev_desc->dev; + dev = dev_desc->devnum; printf("Loading file \"%s\" from %s device %d%c%c\n", filename, argv[1], dev, part ? ':' : ' ', part ? part + '0' : ' '); |