]> git.dujemihanovic.xyz Git - u-boot.git/commit
timer-uclass: add timer_get_ops() macro
authorOvidiu Panait <ovpanait@gmail.com>
Wed, 12 Oct 2022 05:36:54 +0000 (08:36 +0300)
committerMichal Simek <michal.simek@amd.com>
Tue, 22 Nov 2022 14:02:07 +0000 (15:02 +0100)
commit1e766a04c723e003c001c0f1a4f301aef026a75e
tree7c8d9a613b2ffb556b23e5f56eaba5f25a8454c4
parentba74bcf3e07b10ffebf42e72a656b420215b5a2e
timer-uclass: add timer_get_ops() macro

Align timer uclass with the other subsystems and provide a timer_get_ops()
convenience macro.

Using this instead of the generic device_get_ops() also prevents
-Wdiscarded-qualifiers warnings when used with non-const variables.

Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20221012053656.1492457-1-ovpanait@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
drivers/timer/timer-uclass.c
include/timer.h