Subject: Re: Detaching devices
To: Bill Studenmund <firstname.lastname@example.org>
From: Lennart Augustsson <email@example.com>
Date: 06/28/1999 13:35:04
Bill Studenmund wrote:
> > > Lennart Augustsson <firstname.lastname@example.org> wrote:
> > That was never my plan. Besides, I have no control over when the softc is
> > deallocated. It happens in config_detach() after the driver's detach routine
> > has finished (successfully). So at this time there had better be no references
> > it.
> that's what reference counting is for. :-) What you/we need to do is add
> foo_addref and foo_delref routines. When all the references have been
> deleted, the memory goes away.
Yes, I know reference counting can solve the problem. But the current
attach/detach mechanism doesn't use it.
It would probably be a lot of work to add reference counting to all the
relevant device drivers. :-(