Loading drivers/auxdisplay/charlcd.c +8 −10 Original line number Diff line number Diff line Loading @@ -470,12 +470,14 @@ static ssize_t charlcd_write(struct file *file, const char __user *buf, char c; 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 * that need some CPU * charlcd_write() is invoked as a VFS->write() callback * and as such it is always invoked from preemptible * context and may sleep. */ schedule(); cond_resched(); } if (get_user(c, tmp)) return -EFAULT; Loading Loading @@ -537,12 +539,8 @@ static void charlcd_puts(struct charlcd *lcd, const char *s) int count = strlen(s); for (; count-- > 0; tmp++) { if (!in_interrupt() && (((count + 1) & 0x1f) == 0)) /* * let's be a little nice with other processes * that need some CPU */ schedule(); if (((count + 1) & 0x1f) == 0) cond_resched(); charlcd_write_char(lcd, *tmp); } Loading Loading
drivers/auxdisplay/charlcd.c +8 −10 Original line number Diff line number Diff line Loading @@ -470,12 +470,14 @@ static ssize_t charlcd_write(struct file *file, const char __user *buf, char c; 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 * that need some CPU * charlcd_write() is invoked as a VFS->write() callback * and as such it is always invoked from preemptible * context and may sleep. */ schedule(); cond_resched(); } if (get_user(c, tmp)) return -EFAULT; Loading Loading @@ -537,12 +539,8 @@ static void charlcd_puts(struct charlcd *lcd, const char *s) int count = strlen(s); for (; count-- > 0; tmp++) { if (!in_interrupt() && (((count + 1) & 0x1f) == 0)) /* * let's be a little nice with other processes * that need some CPU */ schedule(); if (((count + 1) & 0x1f) == 0) cond_resched(); charlcd_write_char(lcd, *tmp); } Loading