On Tue, Aug 30, 2011 at 08:20:04PM -0700, Chris Furlough wrote: > OK, hopefully my last couple of questions: > > 1. From the kernel, what's the best way to enumerate the devices > that are already plugged in? > > 2. I can use filp_open to open the devices in USBFS, this gives me > a struct file, from which I can get the struct file_operations, from > which I can get a pointer to the IOCTL function for that device. I > can cast that as a function pointer, and call it, but I believe that > it's expecting the last parameter to be a pointer to a buffer in > userspace. Is there a correct way to handle this? Alan has pointed out how to do all of this, but again, these are all things that you should not be doing, and are not allowed in any code you want to have accepted into the kernel tree. What exactly are you trying to accomplish here? No kernel code should EVER be opening usbfs files. greg k-h -- 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