dm: treewide: Rename dev_get_platdata() to dev_get_plat()
[platform/kernel/u-boot.git] / drivers / power / acpi_pmc / pmc_emul.c
index 15cc7ac..0a72afd 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/test.h>
 #include <power/acpi_pmc.h>
@@ -42,10 +43,10 @@ struct pmc_emul_priv {
        u8 regs[MEMMAP_SIZE];
 };
 
-static int sandbox_pmc_emul_read_config(struct udevice *emul, uint offset,
+static int sandbox_pmc_emul_read_config(const struct udevice *emul, uint offset,
                                        ulong *valuep, enum pci_size_t size)
 {
-       struct pmc_emul_platdata *plat = dev_get_platdata(emul);
+       struct pmc_emul_platdata *plat = dev_get_plat(emul);
 
        switch (offset) {
        case PCI_COMMAND:
@@ -98,7 +99,7 @@ static int sandbox_pmc_emul_read_config(struct udevice *emul, uint offset,
 static int sandbox_pmc_emul_write_config(struct udevice *emul, uint offset,
                                         ulong value, enum pci_size_t size)
 {
-       struct pmc_emul_platdata *plat = dev_get_platdata(emul);
+       struct pmc_emul_platdata *plat = dev_get_plat(emul);
 
        switch (offset) {
        case PCI_COMMAND:
@@ -126,7 +127,7 @@ static int sandbox_pmc_emul_write_config(struct udevice *emul, uint offset,
 static int sandbox_pmc_emul_find_bar(struct udevice *emul, unsigned int addr,
                                     int *barnump, unsigned int *offsetp)
 {
-       struct pmc_emul_platdata *plat = dev_get_platdata(emul);
+       struct pmc_emul_platdata *plat = dev_get_plat(emul);
        int barnum;
 
        for (barnum = 0; barnum < ARRAY_SIZE(barinfo); barnum++) {
@@ -234,8 +235,8 @@ U_BOOT_DRIVER(sandbox_pmc_emul_emul) = {
        .of_match       = sandbox_pmc_emul_ids,
        .ops            = &sandbox_pmc_emul_emul_ops,
        .probe          = sandbox_pmc_probe,
-       .priv_auto_alloc_size = sizeof(struct pmc_emul_priv),
-       .platdata_auto_alloc_size = sizeof(struct pmc_emul_platdata),
+       .priv_auto      = sizeof(struct pmc_emul_priv),
+       .plat_auto      = sizeof(struct pmc_emul_platdata),
 };
 
 static struct pci_device_id sandbox_pmc_emul_supported[] = {