Hi, On Thu, Jan 26, 2017 at 8:33 AM, Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> wrote: > Okash Khawaja, on Thu 26 Jan 2017 08:24:29 +0000, wrote: >> >> +static void speakup_ldisc_close(struct tty_struct *tty) >> >> +{ >> >> + pr_warn("speakup_test_close()\n"); >> > >> > Does it get called at speakup_dummy removal time? >> >> No > > Ok. I guess what we are missing is some part of the rest of > tty_release(). We notably seem to be lacking tty_ldisc_release(tty); > between tty_unlock and tty_flush_works. Added tty_ldisc_release() which resolved the problem. Also added tty_ldisc_flush() before tty_ldisc_release(). Wouldn't it be safer to add those functions before tty_unlock()? The only output I get from speakup_dummy is: Speakup RATE 8 PITCH 8 VOL 8 TONE 8 Dummy found That's same before and after this ldisc change. I looked around for tty release code, specifically tty_release() in drivers/tty/tty_io.c. Not sure if there's something else missing here. The modules seem to load and unload (multiple times) okay. Kernel log doesn't show anything odd. I'll still do some more tests and make the changes you suggested above before sharing the patch. > > Samuel Thanks, Okash _______________________________________________ Speakup mailing list Speakup@xxxxxxxxxxxxxxxxx http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup