diff options
| author | Samuel Holland <[email protected]> | 2022-05-29 12:00:48 -0500 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2022-05-30 10:43:03 +0530 |
| commit | 295e5f3c6912bef798e31d6946ba0aacb91f95d0 (patch) | |
| tree | 64a7213302334a43af6f0705ff1dc0b468071bfd | |
| parent | fab0379bb60d6e177018b53f07718b69ba34948d (diff) | |
lib: sbi_timer: Drop unnecessary get_platform_ticks wrapper
The device's timer_value callback is already the right prototype to use
for the get_time_val function pointer.
Signed-off-by: Samuel Holland <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
| -rw-r--r-- | lib/sbi/sbi_timer.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/sbi/sbi_timer.c b/lib/sbi/sbi_timer.c index 353886f3..b0a6e63f 100644 --- a/lib/sbi/sbi_timer.c +++ b/lib/sbi/sbi_timer.c @@ -44,11 +44,6 @@ static u64 get_ticks(void) } #endif -static u64 get_platform_ticks(void) -{ - return timer_dev->timer_value(); -} - static void nop_delay_fn(void *opaque) { cpu_relax(); @@ -167,7 +162,7 @@ void sbi_timer_set_device(const struct sbi_timer_device *dev) timer_dev = dev; if (!get_time_val && timer_dev->timer_value) - get_time_val = get_platform_ticks; + get_time_val = timer_dev->timer_value; } int sbi_timer_init(struct sbi_scratch *scratch, bool cold_boot) |
