diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/blk-uclass.c | 28 | ||||
-rw-r--r-- | drivers/block/ide.c | 6 | ||||
-rw-r--r-- | drivers/block/sandbox.c | 8 |
3 files changed, 21 insertions, 21 deletions
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index 714e5d7..d0d91db 100644 --- a/drivers/block/blk-uclass.c +++ b/drivers/block/blk-uclass.c @@ -79,7 +79,7 @@ struct blk_desc *blk_get_devnum_by_type(enum if_type if_type, int devnum) ret = blk_get_device(if_type, devnum, &dev); if (ret) return NULL; - desc = dev_get_uclass_platdata(dev); + desc = dev_get_uclass_plat(dev); return desc; } @@ -114,7 +114,7 @@ struct blk_desc *blk_get_devnum_by_typename(const char *if_typename, int devnum) if (ret) return NULL; uclass_foreach_dev(dev, uc) { - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); debug("%s: if_type=%d, devnum=%d: %s, %d, %d\n", __func__, if_type, devnum, dev->name, desc->if_type, desc->devnum); @@ -154,7 +154,7 @@ struct blk_desc *blk_get_by_device(struct udevice *dev) if (device_get_uclass_id(child_dev) != UCLASS_BLK) continue; - return dev_get_uclass_platdata(child_dev); + return dev_get_uclass_plat(child_dev); } debug("%s: No block device found\n", __func__); @@ -184,7 +184,7 @@ static int get_desc(enum if_type if_type, int devnum, struct blk_desc **descp) if (ret) return ret; uclass_foreach_dev(dev, uc) { - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); debug("%s: if_type=%d, devnum=%d: %s, %d, %d\n", __func__, if_type, devnum, dev->name, desc->if_type, desc->devnum); @@ -368,7 +368,7 @@ int blk_first_device(int if_type, struct udevice **devp) if (!*devp) return -ENODEV; do { - desc = dev_get_uclass_platdata(*devp); + desc = dev_get_uclass_plat(*devp); if (desc->if_type == if_type) return 0; ret = uclass_find_next_device(devp); @@ -384,7 +384,7 @@ int blk_next_device(struct udevice **devp) struct blk_desc *desc; int ret, if_type; - desc = dev_get_uclass_platdata(*devp); + desc = dev_get_uclass_plat(*devp); if_type = desc->if_type; do { ret = uclass_find_next_device(devp); @@ -392,7 +392,7 @@ int blk_next_device(struct udevice **devp) return ret; if (!*devp) return -ENODEV; - desc = dev_get_uclass_platdata(*devp); + desc = dev_get_uclass_plat(*devp); if (desc->if_type == if_type) return 0; } while (1); @@ -408,7 +408,7 @@ int blk_find_device(int if_type, int devnum, struct udevice **devp) if (ret) return ret; uclass_foreach_dev(dev, uc) { - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); debug("%s: if_type=%d, devnum=%d: %s, %d, %d\n", __func__, if_type, devnum, dev->name, desc->if_type, desc->devnum); @@ -516,7 +516,7 @@ int blk_find_max_devnum(enum if_type if_type) if (ret) return ret; uclass_foreach_dev(dev, uc) { - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); if (desc->if_type == if_type && desc->devnum > max_devnum) max_devnum = desc->devnum; @@ -548,7 +548,7 @@ static int blk_claim_devnum(enum if_type if_type, int devnum) if (ret) return ret; uclass_foreach_dev(dev, uc) { - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); if (desc->if_type == if_type && desc->devnum == devnum) { int next = blk_next_free_devnum(if_type); @@ -583,7 +583,7 @@ int blk_create_device(struct udevice *parent, const char *drv_name, ret = device_bind_driver(parent, drv_name, name, &dev); if (ret) return ret; - desc = dev_get_uclass_platdata(dev); + desc = dev_get_uclass_plat(dev); desc->if_type = if_type; desc->blksz = blksz; desc->log2blksz = LOG2(desc->blksz); @@ -629,7 +629,7 @@ int blk_unbind_all(int if_type) if (ret) return ret; uclass_foreach_dev_safe(dev, next, uc) { - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); if (desc->if_type == if_type) { ret = device_remove(dev, DM_REMOVE_NORMAL); @@ -648,7 +648,7 @@ static int blk_post_probe(struct udevice *dev) { if (IS_ENABLED(CONFIG_PARTITIONS) && IS_ENABLED(CONFIG_HAVE_BLOCK_DEVICE)) { - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); part_init(desc); } @@ -660,5 +660,5 @@ UCLASS_DRIVER(blk) = { .id = UCLASS_BLK, .name = "blk", .post_probe = blk_post_probe, - .per_device_platdata_auto = sizeof(struct blk_desc), + .per_device_plat_auto = sizeof(struct blk_desc), }; diff --git a/drivers/block/ide.c b/drivers/block/ide.c index a766b5c..43a0776 100644 --- a/drivers/block/ide.c +++ b/drivers/block/ide.c @@ -940,7 +940,7 @@ ulong ide_read(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt, #endif { #ifdef CONFIG_BLK - struct blk_desc *block_dev = dev_get_uclass_platdata(dev); + struct blk_desc *block_dev = dev_get_uclass_plat(dev); #endif int device = block_dev->devnum; ulong n = 0; @@ -1067,7 +1067,7 @@ ulong ide_write(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt, #endif { #ifdef CONFIG_BLK - struct blk_desc *block_dev = dev_get_uclass_platdata(dev); + struct blk_desc *block_dev = dev_get_uclass_plat(dev); #endif int device = block_dev->devnum; ulong n = 0; @@ -1160,7 +1160,7 @@ int ide_device_present(int dev) #ifdef CONFIG_BLK static int ide_blk_probe(struct udevice *udev) { - struct blk_desc *desc = dev_get_uclass_platdata(udev); + struct blk_desc *desc = dev_get_uclass_plat(udev); /* fill in device vendor/product/rev strings */ strncpy(desc->vendor, ide_dev_desc[desc->devnum].vendor, diff --git a/drivers/block/sandbox.c b/drivers/block/sandbox.c index e5ef260..12d3200 100644 --- a/drivers/block/sandbox.c +++ b/drivers/block/sandbox.c @@ -35,7 +35,7 @@ static unsigned long host_block_read(struct udevice *dev, void *buffer) { struct host_block_dev *host_dev = dev_get_platdata(dev); - struct blk_desc *block_dev = dev_get_uclass_platdata(dev); + struct blk_desc *block_dev = dev_get_uclass_plat(dev); #else static unsigned long host_block_read(struct blk_desc *block_dev, @@ -66,7 +66,7 @@ static unsigned long host_block_write(struct udevice *dev, const void *buffer) { struct host_block_dev *host_dev = dev_get_platdata(dev); - struct blk_desc *block_dev = dev_get_uclass_platdata(dev); + struct blk_desc *block_dev = dev_get_uclass_plat(dev); #else static unsigned long host_block_write(struct blk_desc *block_dev, unsigned long start, lbaint_t blkcnt, @@ -202,7 +202,7 @@ int host_get_dev_err(int devnum, struct blk_desc **blk_devp) ret = blk_get_device(IF_TYPE_HOST, devnum, &dev); if (ret) return ret; - *blk_devp = dev_get_uclass_platdata(dev); + *blk_devp = dev_get_uclass_plat(dev); #else struct host_block_dev *host_dev = find_host_device(devnum); @@ -228,7 +228,7 @@ U_BOOT_DRIVER(sandbox_host_blk) = { .name = "sandbox_host_blk", .id = UCLASS_BLK, .ops = &sandbox_host_blk_ops, - .platdata_auto = sizeof(struct host_block_dev), + .plat_auto = sizeof(struct host_block_dev), }; #else U_BOOT_LEGACY_BLK(sandbox_host) = { |