Re: ttydev_cdevsw has no d_purge

From: Ed Schouten <ed_at_80386.nl>
Date: Mon, 6 Aug 2012 11:28:01 +0200
Hi Hans,

2012/8/5 Hans Petter Selasky <hselasky_at_c2i.net>:
> When can the previous unit number be re-used? Is there a callback for this?

The unit number can be reused after .tsw_free() has been called.

> When can the USB serial code assume that it will not be called again and that
> all callbacks are drained?

The tty_rel_gone() function has to be called while holding the TTY
lock. Also, all calls done by the TTY layer into the driver also hold
the TTY lock and will assert that the TTY is not in the `gone' state.
So you can safely assume that you will not get any driver calls as
soon as tty_rel_gone() returns.

I hope this helps. If you have any further questions, let me know!

-- 
Ed Schouten <ed_at_80386.nl>
Received on Mon Aug 06 2012 - 07:28:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:29 UTC