usb callback and usb probe

Hi, all.

I'm just writing a driver for a USB data aquistion board. Folowing 
questions:

The interrupts in the USB subsystem are handled by a callback function 
of the usb-subsystem itself. As an argument I get the urb. This urb 
contains also a "private" pointer to whatever. Can a fill this pointer 
with the "dev" argument from
xxx_attach(comedi_device * dev, comedi_devconfig * it)?

The other question is also related to this. The usb probes the devices 
asynchronously (hot-plugging). The probe function has no private data at 
all. Therefore I have no direct access to "dev". However, I could store 
"dev" from comedi somewhere in a private _global_ structure (huh!)... 
Any better ideas how to circumvent the global pointer with probe? The 
thing is that probe should also work much later when the user plugs in a 
device and the dev structure could be updated "on the fly" and not 
directly inside of xxx_attach.

Thanks
/Bernd

-- 
http://www.cn.stir.ac.uk/~bp1/
mailto:bp1_at_cn.stir.ac.uk

Received on 2003-05-04Z17:00:13