From 8af7bb914f8b2238ea37faa8e59277ba4cb26d37 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Wed, 7 Oct 2020 14:37:44 -0400 Subject: timer: Return count from timer_ops.get_count No timer drivers return an error from get_count. Instead of possibly returning an error, just return the count directly. Signed-off-by: Sean Anderson Reviewed-by: Claudiu Beznea Reviewed-by: Simon Glass --- include/timer.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/timer.h b/include/timer.h index aa9d870..a044cb0 100644 --- a/include/timer.h +++ b/include/timer.h @@ -67,11 +67,14 @@ struct timer_ops { * * @dev: The timer device * - * @count: pointer that returns the current 64-bit timer count + * This function may be called at any time after the driver is probed. + * All necessary initialization must be completed by the time probe() + * returns. The count returned by this functions should be monotonic. + * This function must succeed. * - * Return: 0 if OK, -ve on error + * Return: The current 64-bit timer count */ - int (*get_count)(struct udevice *dev, u64 *count); + u64 (*get_count)(struct udevice *dev); }; /** -- cgit v1.1