On Mon, 16 Dec 2002 00:29:24 +0100
"Oliver Neukum" <[EMAIL PROTECTED]> wrote:

> But this is about getting the interface from the minor, isn't it?
> This is a problem that for drivers which use a character device
> must be solved.

Well, before they used to get only local data storage from minor.
It would be same dev_get_drvdata(&intf->dev) to return of the 
usb_find_interface() function and call it usb_find_drvdata(), but 
Greg liked interface finding better. One thing that makes it better 
returning interface (or maybe usb_device) is that returning the 
local data pointer, the return type must be void *, so no type 
checking by compiler. The drivers do mess with usb_interface 
also in probe() and disconnect(), so using usb_interface as return 
type is not so bad.

For me the issue was originally that some drivers using minor table
were broken and only usblp worked (because USBLP_MINOR_BASE 
happens to be always 0) and minor tables were referenced with and 
without the BASE subtracted. And I am having Epson USB scanner, 
so I need the driver (sane epson front end does not use libusb yet).

> The only issue that I see is that you made common code for doing so
> but failed to put proper locking into it, which means reference counting
> in this case.

Ok, I am not really familiar how reference counting is to be used in kernel, 
so maybe somebody else can fix it.

---
Kari H�meenaho


-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to