I'm looking for a bit of help regarding a 2.6 driver I am working on. The driver is a simple usb device that creates a unique proc entry for controlling each device (e.g. /proc/deviceN_ctrl). This works fine until the device is removed by unplugging the cable, while in use.
Under these circumstances the remove_proc_entry fails as there is still an active reference count on the device. Is there any way to kill all active users of the device. It seems that the linux driver architecture relies on user-space apps to be notified by the driver, when a device is removed. How do I do this?
The /proc/ctrl approach to controlling a device from user-space seems to be quite common (e.g. all video for linux devices do it), but I cannot find any other code where this situation is handled, all seem to accept that all references will be closed by the time the device is removed.
Any help welcome