Thread (5 messages) flat view 5 messages, 3 authors, 2016-09-11

udelay vs usleep_range

From: Nicholas Mc Guire <hidden>
Date: 2016-09-11 16:48:49

But looking into the code on line 634 where I found the udelay(33), I
have the impression that this is a false positive, something your
checkpatch didn't catch properly. That call is inside a function named
nvec_interrupt(), and the line:

        err = devm_request_irq(&pdev->dev, nvec->irq, nvec_interrupt,
0, "nvec", nvec);

declares it as the interrupt handler. The interrupt handler can't
sleep(interrupt handler runs in the atomic context in terminology of
timers-howto.txt), and using udelay() seems to be the thing to do
here.
devm_request_irq
  -> devm_request_threaded_irq 
       -> request_threaded_irq

so this should be ok here.

thx!
hofrat
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help