Usb driver programming, ioctl returns -1

view full story

http://www.linuxquestions.org – I'm creating a usb device driver that needs to be able to read from two different endpoints. I couldn't see any way of having two read functions in the driver, so I got round this by reading from one of the endpoints with read, and the other with ioctl. However this hasn't worked, the ioctl call from c returns -1. I added a printk command in the driver in the ioctl function, however looking at kern.log I can see that this function is never being called. Just to mention, debugging is enabled, the other drivers work fine and the ioctl function has been added to the fil (HowTos)