[RFC 1/2] clocksource: Introduce a context storage for the clocksource structure
Sascha Hauer
sha at pengutronix.de
Fri Jun 10 02:44:46 PDT 2022
On Fri, Jun 10, 2022 at 12:42:58PM +0300, Alexander Shiyan wrote:
> пт, 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.
Indeed. I didn't notice this change in your patch. That part would be
useful
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