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 'tty-5.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
"Here are five small fixes for some tty/serial/vt issues that have been
reported.

The vt one has been around for a while, it is good to finally get that
resolved. The others fix a build warning that showed up in 5.1-rc1,
and resolve a problem in the sh-sci driver.

Note, the second patch for build warning fix for the sc16is7xx driver
was just applied to the tree, as it resolves a problem with the
previous patch to try to solve the issue. It has not shown up in
linux-next yet, unlike all of the other patches, but it has passed
0-day testing and everyone seems to agree that it is correct"

* tag 'tty-5.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
sc16is7xx: put err_spi and err_i2c into correct #ifdef
vt: fix cursor when clearing the screen
sc16is7xx: move label 'err_spi' to correct section
serial: sh-sci: Fix HSCIF RX sampling point adjustment
serial: sh-sci: Fix HSCIF RX sampling point calculation

+9 -4
+3 -1
drivers/tty/serial/sc16is7xx.c
··· 1520 1520 #endif 1521 1521 return ret; 1522 1522 1523 + #ifdef CONFIG_SERIAL_SC16IS7XX_SPI 1523 1524 err_spi: 1525 + #endif 1524 1526 #ifdef CONFIG_SERIAL_SC16IS7XX_I2C 1525 1527 i2c_del_driver(&sc16is7xx_i2c_uart_driver); 1526 - #endif 1527 1528 err_i2c: 1529 + #endif 1528 1530 uart_unregister_driver(&sc16is7xx_uart); 1529 1531 return ret; 1530 1532 }
+4 -2
drivers/tty/serial/sh-sci.c
··· 2512 2512 * center of the last stop bit in sampling clocks. 2513 2513 */ 2514 2514 int last_stop = bits * 2 - 1; 2515 - int deviation = min_err * srr * last_stop / 2 / baud; 2515 + int deviation = DIV_ROUND_CLOSEST(min_err * last_stop * 2516 + (int)(srr + 1), 2517 + 2 * (int)baud); 2516 2518 2517 2519 if (abs(deviation) >= 2) { 2518 2520 /* At least two sampling clocks off at the 2519 2521 * last stop bit; we can increase the error 2520 2522 * margin by shifting the sampling point. 2521 2523 */ 2522 - int shift = min(-8, max(7, deviation / 2)); 2524 + int shift = clamp(deviation / 2, -8, 7); 2523 2525 2524 2526 hssrr |= (shift << HSCIF_SRHP_SHIFT) & 2525 2527 HSCIF_SRHP_MASK;
+2 -1
drivers/tty/vt/vt.c
··· 1520 1520 return; 1521 1521 } 1522 1522 scr_memsetw(start, vc->vc_video_erase_char, 2 * count); 1523 - update_region(vc, (unsigned long) start, count); 1523 + if (con_should_update(vc)) 1524 + do_update_region(vc, (unsigned long) start, count); 1524 1525 vc->vc_need_wrap = 0; 1525 1526 } 1526 1527