Line discipline

Okash Khawaja okash.khawaja at gmail.com
Thu Jan 26 03:24:29 EST 2017


Hi,

On Thu, Jan 26, 2017 at 12:18 AM, Samuel Thibault
<samuel.thibault at ens-lyon.org> wrote:
> 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?

No

>
>> +static void release_ldisc(void)
>> +{
>
> Does it get called at speakup_dummy removal time?

Yes

>
>> @@ -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.

Sure, absolutely. I hacked this together just to test it in action so
it's not final yet :)
>
> Samuel


More information about the Speakup mailing list