diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-03 16:55:18 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-13 16:51:08 -0700 |
commit | caa4daa2ae3dc0a3e516addea5772c9af76abcb0 (patch) | |
tree | 0abbc5b538894532f4db28d56e4645d3be230d27 /drivers/usb/emul | |
parent | 41575d8e4c334df148c4cdd7c40cc825dc0fcaa1 (diff) | |
download | u-boot-caa4daa2ae3dc0a3e516addea5772c9af76abcb0.tar.gz |
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/usb/emul')
-rw-r--r-- | drivers/usb/emul/sandbox_flash.c | 2 | ||||
-rw-r--r-- | drivers/usb/emul/sandbox_hub.c | 8 | ||||
-rw-r--r-- | drivers/usb/emul/sandbox_keyb.c | 2 | ||||
-rw-r--r-- | drivers/usb/emul/usb-emul-uclass.c | 14 |
4 files changed, 13 insertions, 13 deletions
diff --git a/drivers/usb/emul/sandbox_flash.c b/drivers/usb/emul/sandbox_flash.c index d63dee41fc..62c8166cae 100644 --- a/drivers/usb/emul/sandbox_flash.c +++ b/drivers/usb/emul/sandbox_flash.c @@ -422,5 +422,5 @@ U_BOOT_DRIVER(usb_sandbox_flash) = { .ofdata_to_platdata = sandbox_flash_ofdata_to_platdata, .ops = &sandbox_usb_flash_ops, .priv_auto = sizeof(struct sandbox_flash_priv), - .platdata_auto = sizeof(struct sandbox_flash_plat), + .plat_auto = sizeof(struct sandbox_flash_plat), }; diff --git a/drivers/usb/emul/sandbox_hub.c b/drivers/usb/emul/sandbox_hub.c index 3e66ca4698..91158e5c6d 100644 --- a/drivers/usb/emul/sandbox_hub.c +++ b/drivers/usb/emul/sandbox_hub.c @@ -131,7 +131,7 @@ static struct udevice *hub_find_device(struct udevice *hub, int port, device_find_next_child(&dev)) { struct sandbox_hub_platdata *plat; - plat = dev_get_parent_platdata(dev); + plat = dev_get_parent_plat(dev); if (plat->port == port) { gen_desc = plat->plat.desc_list; gen_desc = usb_emul_find_descriptor(gen_desc, @@ -304,8 +304,8 @@ static int sandbox_hub_bind(struct udevice *dev) static int sandbox_child_post_bind(struct udevice *dev) { - struct sandbox_hub_platdata *plat = dev_get_parent_platdata(dev); - struct usb_emul_platdata *emul = dev_get_uclass_platdata(dev); + struct sandbox_hub_platdata *plat = dev_get_parent_plat(dev); + struct usb_emul_platdata *emul = dev_get_uclass_plat(dev); plat->port = dev_read_u32_default(dev, "reg", -1); emul->port1 = plat->port + 1; @@ -329,7 +329,7 @@ U_BOOT_DRIVER(usb_sandbox_hub) = { .bind = sandbox_hub_bind, .ops = &sandbox_usb_hub_ops, .priv_auto = sizeof(struct sandbox_hub_priv), - .per_child_platdata_auto = + .per_child_plat_auto = sizeof(struct sandbox_hub_platdata), .child_post_bind = sandbox_child_post_bind, }; diff --git a/drivers/usb/emul/sandbox_keyb.c b/drivers/usb/emul/sandbox_keyb.c index c64ce1feeb..16c59457f7 100644 --- a/drivers/usb/emul/sandbox_keyb.c +++ b/drivers/usb/emul/sandbox_keyb.c @@ -242,5 +242,5 @@ U_BOOT_DRIVER(usb_sandbox_keyb) = { .probe = sandbox_keyb_probe, .ops = &sandbox_usb_keyb_ops, .priv_auto = sizeof(struct sandbox_keyb_priv), - .platdata_auto = sizeof(struct sandbox_keyb_plat), + .plat_auto = sizeof(struct sandbox_keyb_plat), }; diff --git a/drivers/usb/emul/usb-emul-uclass.c b/drivers/usb/emul/usb-emul-uclass.c index b306939042..1b7e1ea7c1 100644 --- a/drivers/usb/emul/usb-emul-uclass.c +++ b/drivers/usb/emul/usb-emul-uclass.c @@ -115,7 +115,7 @@ static int usb_emul_find_devnum(int devnum, int port1, struct udevice **emulp) if (ret) return ret; uclass_foreach_dev(dev, uc) { - struct usb_dev_platdata *udev = dev_get_parent_platdata(dev); + struct usb_dev_platdata *udev = dev_get_parent_plat(dev); /* * devnum is initialzied to zero at the beginning of the @@ -140,7 +140,7 @@ static int usb_emul_find_devnum(int devnum, int port1, struct udevice **emulp) return 0; } - plat = dev_get_uclass_platdata(dev); + plat = dev_get_uclass_plat(dev); if (plat->port1 == port1) { debug("%s: Found emulator '%s', port %d\n", __func__, dev->name, port1); @@ -169,7 +169,7 @@ int usb_emul_find(struct udevice *bus, ulong pipe, int port1, int usb_emul_find_for_dev(struct udevice *dev, struct udevice **emulp) { - struct usb_dev_platdata *udev = dev_get_parent_platdata(dev); + struct usb_dev_platdata *udev = dev_get_parent_plat(dev); return usb_emul_find_devnum(udev->devnum, 0, emulp); } @@ -183,7 +183,7 @@ int usb_emul_control(struct udevice *emul, struct usb_device *udev, int ret; /* We permit getting the descriptor before we are probed */ - plat = dev_get_parent_platdata(emul); + plat = dev_get_parent_plat(emul); if (!ops->control) return -ENOSYS; debug("%s: dev=%s\n", __func__, emul->name); @@ -262,7 +262,7 @@ int usb_emul_int(struct udevice *emul, struct usb_device *udev, int usb_emul_setup_device(struct udevice *dev, struct usb_string *strings, void **desc_list) { - struct usb_dev_platdata *plat = dev_get_parent_platdata(dev); + struct usb_dev_platdata *plat = dev_get_parent_plat(dev); struct usb_generic_descriptor **ptr; struct usb_config_descriptor *cdesc; int upto; @@ -298,7 +298,7 @@ UCLASS_DRIVER(usb_emul) = { .id = UCLASS_USB_EMUL, .name = "usb_emul", .post_bind = dm_scan_fdt_dev, - .per_device_platdata_auto = sizeof(struct usb_emul_platdata), + .per_device_plat_auto = sizeof(struct usb_emul_platdata), .per_child_auto = sizeof(struct usb_device), - .per_child_platdata_auto = sizeof(struct usb_dev_platdata), + .per_child_plat_auto = sizeof(struct usb_dev_platdata), }; |