summaryrefslogtreecommitdiffstats
path: root/drivers/misc/altera_sysid.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/altera_sysid.c')
-rw-r--r--drivers/misc/altera_sysid.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/misc/altera_sysid.c b/drivers/misc/altera_sysid.c
index c6502650b7..878df12771 100644
--- a/drivers/misc/altera_sysid.c
+++ b/drivers/misc/altera_sysid.c
@@ -17,7 +17,7 @@ struct altera_sysid_regs {
u32 timestamp; /* Timestamp */
};
-struct altera_sysid_platdata {
+struct altera_sysid_plat {
struct altera_sysid_regs *regs;
};
@@ -59,7 +59,7 @@ U_BOOT_CMD(
static int altera_sysid_read(struct udevice *dev,
int offset, void *buf, int size)
{
- struct altera_sysid_platdata *plat = dev->platdata;
+ struct altera_sysid_plat *plat = dev_get_plat(dev);
struct altera_sysid_regs *const regs = plat->regs;
u32 *sysid = buf;
@@ -69,9 +69,9 @@ static int altera_sysid_read(struct udevice *dev,
return 0;
}
-static int altera_sysid_ofdata_to_platdata(struct udevice *dev)
+static int altera_sysid_of_to_plat(struct udevice *dev)
{
- struct altera_sysid_platdata *plat = dev_get_platdata(dev);
+ struct altera_sysid_plat *plat = dev_get_plat(dev);
plat->regs = map_physmem(dev_read_addr(dev),
sizeof(struct altera_sysid_regs),
@@ -93,7 +93,7 @@ U_BOOT_DRIVER(altera_sysid) = {
.name = "altera_sysid",
.id = UCLASS_MISC,
.of_match = altera_sysid_ids,
- .ofdata_to_platdata = altera_sysid_ofdata_to_platdata,
- .platdata_auto_alloc_size = sizeof(struct altera_sysid_platdata),
+ .of_to_plat = altera_sysid_of_to_plat,
+ .plat_auto = sizeof(struct altera_sysid_plat),
.ops = &altera_sysid_ops,
};