Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1692512
| From | Okash Khawaja <okash.khawaja@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [patch v3 2/3] staging: speakup: use tty_kopen and tty_kclose |
| Date | 2017-07-20 09:40 +0200 |
| Message-ID | <u5ee2-46l-89@gated-at.bofh.it> (permalink) |
| References | <u4BcC-35L-19@gated-at.bofh.it> <u5e4h-41p-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This patch replaces call to tty_open_by_driver with a tty_kopen and uses tty_kclose instead of tty_release_struct to close it. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> --- drivers/staging/speakup/spk_ttyio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/staging/speakup/spk_ttyio.c +++ b/drivers/staging/speakup/spk_ttyio.c @@ -158,7 +158,7 @@ static int spk_ttyio_initialise_ldisc(st if (ret) return ret; - tty = tty_open_by_driver(dev, NULL, NULL); + tty = tty_kopen(dev); if (IS_ERR(tty)) return PTR_ERR(tty); @@ -308,7 +308,7 @@ void spk_ttyio_release(void) tty_ldisc_flush(speakup_tty); tty_unlock(speakup_tty); - tty_release_struct(speakup_tty, speakup_tty->index); + tty_kclose(speakup_tty); } EXPORT_SYMBOL_GPL(spk_ttyio_release);
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-18 13:40 +0200
Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export Dan Carpenter <dan.carpenter@oracle.com> - 2017-07-18 14:30 +0200
Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-18 21:30 +0200
Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-07-18 16:00 +0200
[patch v3 3/3] tty: undo export of tty_open_by_driver Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-20 09:30 +0200
[patch v3 1/3] tty: resolve tty contention between kernel and user space Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-20 09:30 +0200
[patch v3 0/3] tty contention resulting from tty_open_by_driver export Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-20 09:30 +0200
[patch v3 2/3] staging: speakup: use tty_kopen and tty_kclose Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-20 09:40 +0200
csiph-web