diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-01 09:51:16 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-01 09:51:16 -0700 |
commit | 7c314bdfb64e4bb8d2f829376ed56ce663483752 (patch) | |
tree | ce846e0c4e8c8138258dd00c1f15aad7368fafbb /drivers/staging | |
parent | ebf435d3b51b22340ef047aad0c2936ec4833ab2 (diff) | |
parent | 2e5f3a69b6fcd52a64ce3d746c6ee8390b6cabe8 (diff) | |
download | linux-stable-7c314bdfb64e4bb8d2f829376ed56ce663483752.tar.gz linux-stable-7c314bdfb64e4bb8d2f829376ed56ce663483752.tar.bz2 linux-stable-7c314bdfb64e4bb8d2f829376ed56ce663483752.zip |
Merge tag 'tty-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty / serial updates from Greg KH:
"Here is the "big" set of tty/serial driver patches for 5.15-rc1
Nothing major in here at all, just some driver updates and more
cleanups on old tty apis and code that needed it that includes:
- tty.h cleanup of things that didn't belong in it
- other tty cleanups by Jiri
- driver cleanups
- rs485 support added to amba-pl011 driver
- dts updates
- stm32 serial driver updates
- other minor fixes and driver updates
All have been in linux-next for a while with no reported problems"
* tag 'tty-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (83 commits)
tty: serial: uartlite: Use read_poll_timeout for a polling loop
tty: serial: uartlite: Use constants in early_uartlite_putc
tty: Fix data race between tiocsti() and flush_to_ldisc()
serial: vt8500: Use of_device_get_match_data
serial: tegra: Use of_device_get_match_data
serial: 8250_ingenic: Use of_device_get_match_data
tty: serial: linflexuart: Remove redundant check to simplify the code
tty: serial: fsl_lpuart: do software reset for imx7ulp and imx8qxp
tty: serial: fsl_lpuart: enable two stop bits for lpuart32
tty: serial: fsl_lpuart: fix the wrong mapbase value
mxser: use semi-colons instead of commas
tty: moxa: use semi-colons instead of commas
tty: serial: fsl_lpuart: check dma_tx_in_progress in tx dma callback
tty: replace in_irq() with in_hardirq()
serial: sh-sci: fix break handling for sysrq
serial: stm32: use devm_platform_get_and_ioremap_resource()
serial: stm32: use the defined variable to simplify code
Revert "arm pl011 serial: support multi-irq request"
tty: serial: samsung: Add Exynos850 SoC data
tty: serial: samsung: Fix driver data macros style
...
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/fwserial/fwserial.c | 8 | ||||
-rw-r--r-- | drivers/staging/gdm724x/gdm_tty.c | 13 | ||||
-rw-r--r-- | drivers/staging/greybus/uart.c | 4 |
3 files changed, 12 insertions, 13 deletions
diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c index 38a280e876c2..e8fa7f53cd5e 100644 --- a/drivers/staging/fwserial/fwserial.c +++ b/drivers/staging/fwserial/fwserial.c @@ -2852,11 +2852,11 @@ unregister_loop: tty_unregister_driver(fwloop_driver); put_loop: if (create_loop_dev) - put_tty_driver(fwloop_driver); + tty_driver_kref_put(fwloop_driver); unregister_driver: tty_unregister_driver(fwtty_driver); put_tty: - put_tty_driver(fwtty_driver); + tty_driver_kref_put(fwtty_driver); remove_debugfs: debugfs_remove_recursive(fwserial_debugfs); @@ -2871,10 +2871,10 @@ static void __exit fwserial_exit(void) kmem_cache_destroy(fwtty_txn_cache); if (create_loop_dev) { tty_unregister_driver(fwloop_driver); - put_tty_driver(fwloop_driver); + tty_driver_kref_put(fwloop_driver); } tty_unregister_driver(fwtty_driver); - put_tty_driver(fwtty_driver); + tty_driver_kref_put(fwtty_driver); debugfs_remove_recursive(fwserial_debugfs); } diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c index 279de2cd9c4a..04df6f9f5403 100644 --- a/drivers/staging/gdm724x/gdm_tty.c +++ b/drivers/staging/gdm724x/gdm_tty.c @@ -281,9 +281,10 @@ int register_lte_tty_driver(void) int ret; for (i = 0; i < TTY_MAX_COUNT; i++) { - tty_driver = alloc_tty_driver(GDM_TTY_MINOR); - if (!tty_driver) - return -ENOMEM; + tty_driver = tty_alloc_driver(GDM_TTY_MINOR, + TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV); + if (IS_ERR(tty_driver)) + return PTR_ERR(tty_driver); tty_driver->owner = THIS_MODULE; tty_driver->driver_name = DRIVER_STRING[i]; @@ -291,8 +292,6 @@ int register_lte_tty_driver(void) tty_driver->major = GDM_TTY_MAJOR; tty_driver->type = TTY_DRIVER_TYPE_SERIAL; tty_driver->subtype = SERIAL_TYPE_NORMAL; - tty_driver->flags = TTY_DRIVER_REAL_RAW | - TTY_DRIVER_DYNAMIC_DEV; tty_driver->init_termios = tty_std_termios; tty_driver->init_termios.c_cflag = B9600 | CS8 | HUPCL | CLOCAL; tty_driver->init_termios.c_lflag = ISIG | ICANON | IEXTEN; @@ -300,7 +299,7 @@ int register_lte_tty_driver(void) ret = tty_register_driver(tty_driver); if (ret) { - put_tty_driver(tty_driver); + tty_driver_kref_put(tty_driver); return ret; } @@ -319,7 +318,7 @@ void unregister_lte_tty_driver(void) tty_driver = gdm_driver[i]; if (tty_driver) { tty_unregister_driver(tty_driver); - put_tty_driver(tty_driver); + tty_driver_kref_put(tty_driver); } } } diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c index 73f01ed1e5b7..e6d860a9678e 100644 --- a/drivers/staging/greybus/uart.c +++ b/drivers/staging/greybus/uart.c @@ -973,7 +973,7 @@ static int gb_tty_init(void) return 0; fail_put_gb_tty: - put_tty_driver(gb_tty_driver); + tty_driver_kref_put(gb_tty_driver); fail_unregister_dev: return retval; } @@ -981,7 +981,7 @@ fail_unregister_dev: static void gb_tty_exit(void) { tty_unregister_driver(gb_tty_driver); - put_tty_driver(gb_tty_driver); + tty_driver_kref_put(gb_tty_driver); idr_destroy(&tty_minors); } |