Commit 3fef15f8 authored by Linus Torvalds's avatar Linus Torvalds

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.
parents 36a14638 701454bc
...@@ -470,12 +470,14 @@ static ssize_t charlcd_write(struct file *file, const char __user *buf, ...@@ -470,12 +470,14 @@ static ssize_t charlcd_write(struct file *file, const char __user *buf,
char c; char c;
for (; count-- > 0; (*ppos)++, tmp++) { for (; count-- > 0; (*ppos)++, tmp++) {
if (!in_interrupt() && (((count + 1) & 0x1f) == 0)) if (((count + 1) & 0x1f) == 0) {
/* /*
* let's be a little nice with other processes * charlcd_write() is invoked as a VFS->write() callback
* that need some CPU * and as such it is always invoked from preemptible
* context and may sleep.
*/ */
schedule(); cond_resched();
}
if (get_user(c, tmp)) if (get_user(c, tmp))
return -EFAULT; return -EFAULT;
...@@ -537,12 +539,8 @@ static void charlcd_puts(struct charlcd *lcd, const char *s) ...@@ -537,12 +539,8 @@ static void charlcd_puts(struct charlcd *lcd, const char *s)
int count = strlen(s); int count = strlen(s);
for (; count-- > 0; tmp++) { for (; count-- > 0; tmp++) {
if (!in_interrupt() && (((count + 1) & 0x1f) == 0)) if (((count + 1) & 0x1f) == 0)
/* cond_resched();
* let's be a little nice with other processes
* that need some CPU
*/
schedule();
charlcd_write_char(lcd, *tmp); charlcd_write_char(lcd, *tmp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment