Re: [RFC 2/2] clocksource: arm_global_timer: Convert driver to use clocksource context field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



пт, 10 июн. 2022 г. в 12:40, Sascha Hauer <sha@xxxxxxxxxxxxxx>:
>
> On Fri, Jun 10, 2022 at 11:56:32AM +0300, Alexander Shiyan wrote:
> > Signed-off-by: Alexander Shiyan <eagle.alexander923@xxxxxxxxx>
> > ---
> >  drivers/clocksource/arm_global_timer.c | 27 +++++++++++++++-----------
> >  1 file changed, 16 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c
> > index 6e2fae9ba4..3e9b90059a 100644
> > --- a/drivers/clocksource/arm_global_timer.c
> > +++ b/drivers/clocksource/arm_global_timer.c
...
> As long as the statically allocated &cs is used it's not really useful
> to store the context pointer in there.

The meaning here is: With a static clocksource structure, the "ctx" field will
be initialized, so it will not allow a second instance of the driver to be
loaded (in case of incorrect DTS or something similar).

So. this example is just a single instance protector :)
I will review the code to understand how to make it easier.

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux