From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id 6F7EC1F029C; Wed, 25 Jan 2017 19:18:10 -0500 (EST) Received: from hera.aquilenet.fr (hera.aquilenet.fr [IPv6:2a01:474::1]) by befuddled.reisers.ca (Postfix) with ESMTP id 034461EFFE0 for ; Wed, 25 Jan 2017 19:18:08 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 6C535B589; Thu, 26 Jan 2017 01:18:02 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rOSh0OiLDn9u; Thu, 26 Jan 2017 01:18:01 +0100 (CET) Received: from var.youpi.perso.aquilenet.fr (unknown [IPv6:2a01:cb19:181:c200:3602:86ff:fe2c:6a19]) by hera.aquilenet.fr (Postfix) with ESMTPSA id CBFA5B50C; Thu, 26 Jan 2017 01:18:01 +0100 (CET) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.88) (envelope-from ) id 1cWXlJ-0002kM-5W; Thu, 26 Jan 2017 01:18:01 +0100 Date: Thu, 26 Jan 2017 01:18:01 +0100 From: Samuel Thibault To: Okash Khawaja Cc: "Speakup is a screen review system for Linux." Subject: Re: Line discipline Message-ID: <20170126001801.GQ3119@var.home> References: <20161220010836.GN2895@var.home> <20170124083045.GN2695@var.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jan 2017 00:18:10 -0000 Hello, Okash Khawaja, on Tue 24 Jan 2017 21:52:26 +0000, wrote: > >> except for problem when unloading speakup.ko - it is in use so can't > >> be unloaded. I have just got this so investigating it. Very probably a missing thing at speakup_dummy removal time. > +static void speakup_ldisc_close(struct tty_struct *tty) > +{ > + pr_warn("speakup_test_close()\n"); Does it get called at speakup_dummy removal time? > +static void release_ldisc(void) > +{ Does it get called at speakup_dummy removal time? > @@ -421,6 +533,10 @@ void synth_release(void) > struct var_t *var; > unsigned long flags; > > + // okashTODO: maybe speakup_tty should be part of synth. > + > + release_ldisc(); Mmm, I believe calling release_ldisc() rather belongs to the release method of the synths. And notably: > @@ -432,7 +548,7 @@ void synth_release(void) > sysfs_remove_group(speakup_kobj, &synth->attributes); > for (var = synth->vars; var->var_id != MAXVARS; var++) > speakup_unregister_var(var->var_id); > - spk_stop_serial_interrupt(); > +// spk_stop_serial_interrupt(); > synth->release(); The spk_stop_serial_interrupt() call should be moved into spk_serial_release, accent_release, dtpc_release, dtlk_release, and keynote_release, and we'd have another function like spk_serial_release for the tty case. Samuel