Merge tag 'v2021.10-rc4' into next
[platform/kernel/u-boot.git] / drivers / pci / pci-emul-uclass.c
index a520643..a0b8afb 100644 (file)
@@ -82,7 +82,7 @@ uint sandbox_pci_read_bar(u32 barval, int type, uint size)
 
 static int sandbox_pci_emul_post_probe(struct udevice *dev)
 {
-       struct sandbox_pci_emul_priv *priv = dev->uclass->priv;
+       struct sandbox_pci_emul_priv *priv = uclass_get_priv(dev->uclass);
 
        priv->dev_count++;
        sandbox_set_enable_pci_map(true);
@@ -92,7 +92,7 @@ static int sandbox_pci_emul_post_probe(struct udevice *dev)
 
 static int sandbox_pci_emul_pre_remove(struct udevice *dev)
 {
-       struct sandbox_pci_emul_priv *priv = dev->uclass->priv;
+       struct sandbox_pci_emul_priv *priv = uclass_get_priv(dev->uclass);
 
        priv->dev_count--;
        sandbox_set_enable_pci_map(priv->dev_count > 0);
@@ -105,14 +105,14 @@ UCLASS_DRIVER(pci_emul) = {
        .name           = "pci_emul",
        .post_probe     = sandbox_pci_emul_post_probe,
        .pre_remove     = sandbox_pci_emul_pre_remove,
-       .priv_auto_alloc_size   = sizeof(struct sandbox_pci_emul_priv),
-       .per_device_auto_alloc_size     = sizeof(struct pci_emul_uc_priv),
+       .priv_auto      = sizeof(struct sandbox_pci_emul_priv),
+       .per_device_auto        = sizeof(struct pci_emul_uc_priv),
 };
 
 /*
- * This uclass is a child of the pci bus. Its platdata is not defined here so
- * is defined by its parent, UCLASS_PCI, which uses struct pci_child_platdata.
- * See per_child_platdata_auto_alloc_size in UCLASS_DRIVER(pci).
+ * This uclass is a child of the pci bus. Its plat is not defined here so
+ * is defined by its parent, UCLASS_PCI, which uses struct pci_child_plat.
+ * See per_child_plat_auto     in UCLASS_DRIVER(pci).
  */
 UCLASS_DRIVER(pci_emul_parent) = {
        .id             = UCLASS_PCI_EMUL_PARENT,