Re: Check device use before detaching?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 18 Nov 2013, Luke-Jr wrote:

> Is there a way to tell if a USB device is in use or not before requesting the 
> kernel detach drivers?
> 
> I'd define "in use" as either an interface claimed on usbfs or tty/etc 
> provided by a kernel driver being opened. And "not in use" including "kernel 
> driver attached, but not interfacing device to any software".

There is a form of the detach-driver call in usbfs that will not do 
anything if the current driver is usbfs.  But there is no way to tell 
if a tty or other device file is open, or if the device is interfaced 
to any software.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux