Hi, Laurent,

Em Sáb, 2006-09-16 às 23:27 +0200, Laurent Pinchart escreveu:
> Hi Stefan,
> 
> > I am trying out linux-uvc with version 2.6.18-rc6-git3 and it reports
> > unknown symbols for video_get_drvdata and video_set_drvdata. Based on
> > another patch for this problem [1] I have fixed this for uvc. The fix works
> > for me but please bear in mind that I have little kernel programming
> > experience and thus it could be wrong.
> 
> Thanks for the patch. It looks overly complicated to me, and it seems that 
> video_get_drvdata/video_set_drvdata should not have been removed, but 
> modified to use dev_get_drvdata/dev_set_drvdata instead.
> 
> Mauro, could you have a look at that ?
Sure! Can you email it to me? I'm not subscribed on linux-uvc-devel.
> Why have those been removed ? I know 
> they were marked with OBSOLETE_OWNER, but that's becaused they accessed the 
> video_device structure's priv field, marked for removal.
> 
>         /* dev->driver_data will be used instead some day.
>          * Use the video_{get|set}_drvdata() helper functions,
>          * so the switch over will be transparent for you.
>          * Or use {pci|usb}_{get|set}_drvdata() directly. */
>         void *priv;
> 
> Shouldn't video_{get|set}_drvdata() have been kept ?
This stuff just add more complexity and makes the code more opaque, and
adds this additional pointer...

For most cases, it will just turn on something like this (from
cx88-video.c):

static ssize_t
video_read(struct file *file, char __user *data, size_t count, loff_t
*ppos)
{
        struct cx8800_fh *fh = file->private_data;


> Laurent Pinchart
Cheers, 
Mauro.

_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to