diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-04 02:55:23 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-14 02:51:09 +0300 |
commit | 8a8d24bdf174851ebb8607f359d54b72e3283b97 (patch) | |
tree | 89fe2b9fd0c33209ce154170f9bda61f624dd9cd /drivers/usb/emul | |
parent | b012ff1f1b0d662587dcf8707fe7cbf1c1f35d2f (diff) | |
download | u-boot-8a8d24bdf174851ebb8607f359d54b72e3283b97.tar.xz |
dm: treewide: Rename ..._platdata variables to just ..._plat
Try to maintain some consistency between these variables by using _plat as
a suffix for them.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/usb/emul')
-rw-r--r-- | drivers/usb/emul/sandbox_hub.c | 12 | ||||
-rw-r--r-- | drivers/usb/emul/usb-emul-uclass.c | 16 |
2 files changed, 14 insertions, 14 deletions
diff --git a/drivers/usb/emul/sandbox_hub.c b/drivers/usb/emul/sandbox_hub.c index 396923ac78..041ec3772a 100644 --- a/drivers/usb/emul/sandbox_hub.c +++ b/drivers/usb/emul/sandbox_hub.c @@ -13,8 +13,8 @@ /* We only support up to 8 */ #define SANDBOX_NUM_PORTS 4 -struct sandbox_hub_platdata { - struct usb_dev_platdata plat; +struct sandbox_hub_plat { + struct usb_dev_plat plat; int port; /* Port number (numbered from 0) */ }; @@ -129,7 +129,7 @@ static struct udevice *hub_find_device(struct udevice *hub, int port, for (device_find_first_child(hub, &dev); dev; device_find_next_child(&dev)) { - struct sandbox_hub_platdata *plat; + struct sandbox_hub_plat *plat; plat = dev_get_parent_plat(dev); if (plat->port == port) { @@ -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_plat(dev); - struct usb_emul_platdata *emul = dev_get_uclass_plat(dev); + struct sandbox_hub_plat *plat = dev_get_parent_plat(dev); + struct usb_emul_plat *emul = dev_get_uclass_plat(dev); plat->port = dev_read_u32_default(dev, "reg", -1); emul->port1 = plat->port + 1; @@ -329,6 +329,6 @@ U_BOOT_DRIVER(usb_sandbox_hub) = { .bind = sandbox_hub_bind, .ops = &sandbox_usb_hub_ops, .priv_auto = sizeof(struct sandbox_hub_priv), - .per_child_plat_auto = sizeof(struct sandbox_hub_platdata), + .per_child_plat_auto = sizeof(struct sandbox_hub_plat), .child_post_bind = sandbox_child_post_bind, }; diff --git a/drivers/usb/emul/usb-emul-uclass.c b/drivers/usb/emul/usb-emul-uclass.c index 1b7e1ea7c1..f5d98b917d 100644 --- a/drivers/usb/emul/usb-emul-uclass.c +++ b/drivers/usb/emul/usb-emul-uclass.c @@ -75,7 +75,7 @@ struct usb_generic_descriptor **usb_emul_find_descriptor( return ptr; } -static int usb_emul_get_descriptor(struct usb_dev_platdata *plat, int value, +static int usb_emul_get_descriptor(struct usb_dev_plat *plat, int value, void *buffer, int length) { struct usb_generic_descriptor **ptr; @@ -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_plat(dev); + struct usb_dev_plat *udev = dev_get_parent_plat(dev); /* * devnum is initialzied to zero at the beginning of the @@ -126,7 +126,7 @@ static int usb_emul_find_devnum(int devnum, int port1, struct udevice **emulp) * emulator device. */ if (!devnum) { - struct usb_emul_platdata *plat; + struct usb_emul_plat *plat; /* * If the parent is sandbox USB controller, we are @@ -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_plat(dev); + struct usb_dev_plat *udev = dev_get_parent_plat(dev); return usb_emul_find_devnum(udev->devnum, 0, emulp); } @@ -179,7 +179,7 @@ int usb_emul_control(struct udevice *emul, struct usb_device *udev, struct devrequest *setup) { struct dm_usb_ops *ops = usb_get_emul_ops(emul); - struct usb_dev_platdata *plat; + struct usb_dev_plat *plat; int ret; /* We permit getting the descriptor before we are probed */ @@ -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_plat(dev); + struct usb_dev_plat *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_plat_auto = sizeof(struct usb_emul_platdata), + .per_device_plat_auto = sizeof(struct usb_emul_plat), .per_child_auto = sizeof(struct usb_device), - .per_child_plat_auto = sizeof(struct usb_dev_platdata), + .per_child_plat_auto = sizeof(struct usb_dev_plat), }; |