aboutsummaryrefslogtreecommitdiff
path: root/drivers/timer/timer-uclass.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/timer/timer-uclass.c')
-rw-r--r--drivers/timer/timer-uclass.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
index 62d0e860e8..da1a72f025 100644
--- a/drivers/timer/timer-uclass.c
+++ b/drivers/timer/timer-uclass.c
@@ -40,7 +40,7 @@ int notrace timer_get_count(struct udevice *dev, u64 *count)
unsigned long notrace timer_get_rate(struct udevice *dev)
{
- struct timer_dev_priv *uc_priv = dev->uclass_priv;
+ struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
return uc_priv->clock_rate;
}
@@ -54,7 +54,7 @@ static int timer_pre_probe(struct udevice *dev)
ulong ret;
/* It is possible that a timer device has a null ofnode */
- if (!dev_of_valid(dev))
+ if (!dev_has_ofnode(dev))
return 0;
err = clk_get_by_index(dev, 0, &timer_clk);
@@ -90,7 +90,7 @@ static int timer_post_probe(struct udevice *dev)
int timer_timebase_fallback(struct udevice *dev)
{
struct udevice *cpu;
- struct cpu_platdata *cpu_plat;
+ struct cpu_plat *cpu_plat;
struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
/* Did we get our clock rate from the device tree? */
@@ -103,7 +103,7 @@ int timer_timebase_fallback(struct udevice *dev)
if (!cpu)
return -ENODEV;
- cpu_plat = dev_get_parent_platdata(cpu);
+ cpu_plat = dev_get_parent_plat(cpu);
if (!cpu_plat)
return -ENODEV;
@@ -176,5 +176,5 @@ UCLASS_DRIVER(timer) = {
.pre_probe = timer_pre_probe,
.flags = DM_UC_FLAG_SEQ_ALIAS,
.post_probe = timer_post_probe,
- .per_device_auto_alloc_size = sizeof(struct timer_dev_priv),
+ .per_device_auto = sizeof(struct timer_dev_priv),
};