[RFC 1/2] clocksource: Introduce a context storage for the clocksource structure

Alexander Shiyan eagle.alexander923 at gmail.com
Fri Jun 10 02:42:58 PDT 2022


пт, 10 июн. 2022 г. в 12:35, Sascha Hauer <sha at pengutronix.de>:
>
> On Fri, Jun 10, 2022 at 11:56:31AM +0300, Alexander Shiyan wrote:
> > This patch adds a context entry for the clocksource structure.
> > This field can be used to store any private driver data, and to
> > distinguish between multiple driver instances for debugging purposes.
>
> You could embed struct clocksource in a private struct and use
> container_of() to get that from the struct clocksource *.

Oh sure. But even in this case, we need to pass the pointer of the
clocksource structure to the read() function.



More information about the barebox mailing list