Commit 701454b
auxdisplay: Remove in_interrupt() usage.
charlcd_write() is invoked as a VFS->write() callback and as such it is
always invoked from preemptible context and may sleep.
charlcd_puts() is invoked from register/unregister callback which is
preemptible. The reboot notifier callback is also invoked from
preemptible context.
Therefore there is no need to use in_interrupt() to figure out if it
is safe to sleep because it always is. in_interrupt() and related
context checks are being removed from non-core code.
Using schedule() to schedule (and be friendly to others) is
discouraged and cond_resched() should be used instead.
Remove in_interrupt() and use cond_resched() to schedule every 32
iterations if needed.
Link: https://lkml.kernel.org/r/20200914204209.256266093@linutronix.de
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
[mo: fixed a couple typos in comment and commit message]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>1 parent 1e28eed commit 701454b
1 file changed
+8
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
473 | | - | |
| 473 | + | |
474 | 474 | | |
475 | | - | |
476 | | - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
477 | 478 | | |
478 | | - | |
| 479 | + | |
| 480 | + | |
479 | 481 | | |
480 | 482 | | |
481 | 483 | | |
| |||
537 | 539 | | |
538 | 540 | | |
539 | 541 | | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
| 542 | + | |
| 543 | + | |
546 | 544 | | |
547 | 545 | | |
548 | 546 | | |
| |||
0 commit comments