From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Sat, 31 Mar 2001 14:56:28 +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 > > 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. It's important to have the same policy for MOD_INC_USE_COUNT in all drivers. Including drivers, like network drivers, where the use count updating is automated ... both for hotpluggable drivers, and for the other kind. > 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. I suppose USB could add a third field to /proc/bus/usb/drivers; and PCI could add a /proc/bus/pci/drivers file too. It'd work. Maybe those could be argued as 2.4 features; but going that way doesn't seem like the right general direction. It's clearly a generic facility that all hotpluggable drivers need, which in my book means it's best to do it only once. - Dave _______________________________________________ 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