>> camera->v4l.priv = (void*)camera;
> I don't think you're supposed to use the priv field here. Using fops
> should give you a 'struct file *file' on open(), use file->private_data
> for these purposes. On open(), just search the global array of
> registered devices for which device was being opened. That way, you
> don't need to use the priv field.
I usually need the struct video_device 'priv' field to obtain the main
structure using the new v4l1 interface (video_devdata() in particular). On
open , for example:
int open(struct file* filp, ..., ....)
{
...
struct my_device* camera =
(struct my_device*)video_devdata(filp)->priv;
...
}
I think it is more clear this way...
Luca Risolia
--
video4linux-list mailing list
Unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/video4linux-list