Skip to content
Snippets Groups Projects
Commit 841f3216 authored by Bin Meng's avatar Bin Meng Committed by Simon Glass
Browse files

pci: sandbox: emul: Rename priv structure


We have "struct sandbox_pci_priv" in pci_sandbox driver. To avoid
confusion, rename the emul's priv to "struct sandbox_pci_emul_priv".

Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 82b31043
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <pci.h> #include <pci.h>
#include <dm/lists.h> #include <dm/lists.h>
struct sandbox_pci_priv { struct sandbox_pci_emul_priv {
int dev_count; int dev_count;
}; };
...@@ -43,7 +43,7 @@ int sandbox_pci_get_emul(struct udevice *bus, pci_dev_t find_devfn, ...@@ -43,7 +43,7 @@ int sandbox_pci_get_emul(struct udevice *bus, pci_dev_t find_devfn,
static int sandbox_pci_emul_post_probe(struct udevice *dev) static int sandbox_pci_emul_post_probe(struct udevice *dev)
{ {
struct sandbox_pci_priv *priv = dev->uclass->priv; struct sandbox_pci_emul_priv *priv = dev->uclass->priv;
priv->dev_count++; priv->dev_count++;
sandbox_set_enable_pci_map(true); sandbox_set_enable_pci_map(true);
...@@ -53,7 +53,7 @@ static int sandbox_pci_emul_post_probe(struct udevice *dev) ...@@ -53,7 +53,7 @@ static int sandbox_pci_emul_post_probe(struct udevice *dev)
static int sandbox_pci_emul_pre_remove(struct udevice *dev) static int sandbox_pci_emul_pre_remove(struct udevice *dev)
{ {
struct sandbox_pci_priv *priv = dev->uclass->priv; struct sandbox_pci_emul_priv *priv = dev->uclass->priv;
priv->dev_count--; priv->dev_count--;
sandbox_set_enable_pci_map(priv->dev_count > 0); sandbox_set_enable_pci_map(priv->dev_count > 0);
...@@ -66,5 +66,5 @@ UCLASS_DRIVER(pci_emul) = { ...@@ -66,5 +66,5 @@ UCLASS_DRIVER(pci_emul) = {
.name = "pci_emul", .name = "pci_emul",
.post_probe = sandbox_pci_emul_post_probe, .post_probe = sandbox_pci_emul_post_probe,
.pre_remove = sandbox_pci_emul_pre_remove, .pre_remove = sandbox_pci_emul_pre_remove,
.priv_auto_alloc_size = sizeof(struct sandbox_pci_priv), .priv_auto_alloc_size = sizeof(struct sandbox_pci_emul_priv),
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment