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

Sascha Hauer sha at pengutronix.de
Fri Jun 10 02:35:13 PDT 2022


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 *.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list