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);
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);
.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,