aboutsummaryrefslogtreecommitdiff
path: root/drivers/xen/pvblock.c
diff options
context:
space:
mode:
authorSimon Glass2020-12-03 16:55:18 -0700
committerSimon Glass2020-12-13 16:51:08 -0700
commitcaa4daa2ae3dc0a3e516addea5772c9af76abcb0 (patch)
tree0abbc5b538894532f4db28d56e4645d3be230d27 /drivers/xen/pvblock.c
parent41575d8e4c334df148c4cdd7c40cc825dc0fcaa1 (diff)
dm: treewide: Rename 'platdata' variables to just 'plat'
We use 'priv' for private data but often use 'platdata' for platform data. We can't really use 'pdata' since that is ambiguous (it could mean private or platform data). Rename some of the latter variables to end with 'plat' for consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/xen/pvblock.c')
-rw-r--r--drivers/xen/pvblock.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/xen/pvblock.c b/drivers/xen/pvblock.c
index cbb51d26b91..b0c93d6cf68 100644
--- a/drivers/xen/pvblock.c
+++ b/drivers/xen/pvblock.c
@@ -600,7 +600,7 @@ static ulong pvblock_iop(struct udevice *udev, lbaint_t blknr,
lbaint_t blkcnt, void *buffer, int write)
{
struct blkfront_dev *blk_dev = dev_get_priv(udev);
- struct blk_desc *desc = dev_get_uclass_platdata(udev);
+ struct blk_desc *desc = dev_get_uclass_plat(udev);
struct blkfront_aiocb aiocb;
lbaint_t blocks_todo;
bool unaligned;
@@ -658,7 +658,7 @@ ulong pvblock_blk_write(struct udevice *udev, lbaint_t blknr, lbaint_t blkcnt,
static int pvblock_blk_bind(struct udevice *udev)
{
- struct blk_desc *desc = dev_get_uclass_platdata(udev);
+ struct blk_desc *desc = dev_get_uclass_plat(udev);
int devnum;
desc->if_type = IF_TYPE_PVBLOCK;
@@ -685,12 +685,12 @@ static int pvblock_blk_bind(struct udevice *udev)
static int pvblock_blk_probe(struct udevice *udev)
{
struct blkfront_dev *blk_dev = dev_get_priv(udev);
- struct blkfront_platdata *platdata = dev_get_platdata(udev);
- struct blk_desc *desc = dev_get_uclass_platdata(udev);
+ struct blkfront_platdata *plat = dev_get_platdata(udev);
+ struct blk_desc *desc = dev_get_uclass_plat(udev);
int ret, devid;
- devid = platdata->devid;
- free(platdata);
+ devid = plat->devid;
+ free(plat);
ret = init_blkfront(devid, blk_dev);
if (ret < 0)
@@ -737,27 +737,27 @@ static int on_new_vbd(struct udevice *parent, unsigned int devid)
{
struct driver_info info;
struct udevice *udev;
- struct blkfront_platdata *platdata;
+ struct blkfront_platdata *plat;
int ret;
debug("New " DRV_NAME_BLK ", device ID %d\n", devid);
- platdata = malloc(sizeof(struct blkfront_platdata));
- if (!platdata) {
+ plat = malloc(sizeof(struct blkfront_platdata));
+ if (!plat) {
printf("Failed to allocate platform data\n");
return -ENOMEM;
}
- platdata->devid = devid;
+ plat->devid = devid;
info.name = DRV_NAME_BLK;
- info.platdata = platdata;
+ info.plat = plat;
ret = device_bind_by_name(parent, false, &info, &udev);
if (ret < 0) {
printf("Failed to bind " DRV_NAME_BLK " to device with ID %d, ret: %d\n",
devid, ret);
- free(platdata);
+ free(plat);
}
return ret;
}
@@ -802,7 +802,7 @@ static void print_pvblock_devices(void)
class_name = uclass_get_name(UCLASS_PVBLOCK);
for (blk_first_device(IF_TYPE_PVBLOCK, &udev); udev;
blk_next_device(&udev), first = false) {
- struct blk_desc *desc = dev_get_uclass_platdata(udev);
+ struct blk_desc *desc = dev_get_uclass_plat(udev);
if (!first)
puts(", ");