Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'auxdisplay-for-linus-v5.12-rc6' of git://github.com/ojeda/linux

Pull auxdisplay fix from Miguel Ojeda:
"Remove in_interrupt() usage (Sebastian Andrzej Siewior)"

* tag 'auxdisplay-for-linus-v5.12-rc6' of git://github.com/ojeda/linux:
auxdisplay: Remove in_interrupt() usage.

+8 -10
+8 -10
drivers/auxdisplay/charlcd.c
··· 470 470 char c; 471 471 472 472 for (; count-- > 0; (*ppos)++, tmp++) { 473 - if (!in_interrupt() && (((count + 1) & 0x1f) == 0)) 473 + if (((count + 1) & 0x1f) == 0) { 474 474 /* 475 - * let's be a little nice with other processes 476 - * that need some CPU 475 + * charlcd_write() is invoked as a VFS->write() callback 476 + * and as such it is always invoked from preemptible 477 + * context and may sleep. 477 478 */ 478 - schedule(); 479 + cond_resched(); 480 + } 479 481 480 482 if (get_user(c, tmp)) 481 483 return -EFAULT; ··· 539 537 int count = strlen(s); 540 538 541 539 for (; count-- > 0; tmp++) { 542 - if (!in_interrupt() && (((count + 1) & 0x1f) == 0)) 543 - /* 544 - * let's be a little nice with other processes 545 - * that need some CPU 546 - */ 547 - schedule(); 540 + if (((count + 1) & 0x1f) == 0) 541 + cond_resched(); 548 542 549 543 charlcd_write_char(lcd, *tmp); 550 544 }