Commit 084a4735 authored by Okash Khawaja's avatar Okash Khawaja Committed by Greg Kroah-Hartman

staging: speakup: use tty_kopen and tty_kclose

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: default avatarOkash Khawaja <okash.khawaja@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a09ac397
......@@ -144,7 +144,7 @@ static int spk_ttyio_initialise_ldisc(struct spk_synth *synth)
if (ret)
return ret;
tty = tty_open_by_driver(dev, NULL, NULL);
tty = tty_kopen(dev);
if (IS_ERR(tty))
return PTR_ERR(tty);
......@@ -337,7 +337,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);
......
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