From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brad Hards Date: Sat, 31 Mar 2001 08:55:46 +0000 Subject: Re: (remove) event not supported. Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org David Hinds wrote: > > On Fri, Mar 30, 2001 at 06:03:32PM -0800, Keith Owens wrote: > > > > AFAICT there is no need for another count, you can do MOD_INC_USE_COUNT > > in any module function. The use count does not have to be for just > > open. Add MOD_INC_USE_COUNT to the probe() function for each new > > device. > > So what if I want to unload a module for a device that still exists? > These counts are also used in this way for non-hot-plugged devices. > > For PCMCIA, device counts for each driver are published in > /proc/bus/pccard/drivers, and cardmgr uses this information to help > decide when to unload drivers. Also a good point, but in general, you don't want to do this. If there is a device still "connected" to the system, you don't want to remove the driver. For development, you might like to simulate a disconnection, but the normal approach is that you want support for every device that is connected to the system. Why remove a module for a device you are using? It might be appropriate to remove the module (simulating the disconnect) on some other basis, like that it is close()'d, but I am not sure exactly what makes sense here. Brad _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel