Re: [PATCH 2/3] iio: light: vl6180: Added Interrupt support for single shot access

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

 



> > +     if (client->irq) {
> > +             reinit_completion(&data->completion);
>
> That's late so there is a race condition. You might be delayed just before this
> and finish the measurement before the reint_completion() in which case you'll
> clear the complete() that happens in the interrupt handler before
> then waiting on it.
Yes this makes sense.

> This reinit needs to be before whatever can potentially trigger
> that interrupt.
Can you explain this part, because where can i reinit it, The measurement
starts when we write the START_STOP bit to SYSRANGE_START. So should
it be before that.
I'm kind of confused with this.

Thank you,
Abhash




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux