guidance needed on vfd->release and proc/sysfs changes in 2.6 v4l

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi,

I've been maintaining the cpia v4l webcam driver (drivers/media/video/cpia.c)

I got back from a trip and tested 2.6.0-test3 and find changes....

I found a discussion about "sysfs-ifying" drivers on this list,
but dont quite understand the details.

Could I get some guidance?

-- The cpia.c driver creates,uses, and eventually destroys a
/proc/cpia/video<n> 
for controlling /dev/video<n>.   This is done by its own private
functions.  (see cpia.c code in #ifdef CONFIG_PROC_FS ... #endif sections) 

Am I correct in assuming that its OK to leave this use of /proc
untouched, or is is "trivial" to convert it to sysfs ?

-- what is the missing .release in struct video_device supposed to do? 
(struct video_device doesnt seem to have a member ".release")
Am I supposed to add a currently-unused function video_device_release()
to cpia.c in anticipation of struct video_device eventually getting a
.release member?

Thanks
Duncan

=========from videodev.c======================
void video_device_release(struct video_device *vfd)
{
        kfree(vfd);
}

static void video_release(struct class_device *cd)
{
        struct video_device *vfd = container_of(cd, struct video_device,
class_dev);

#if 1 /* needed until all drivers are fixed */
        if (!vfd->release)
                return;
#endif
        vfd->release(vfd);
}
===========================


----------------------------------
E-Mail: Duncan Haldane <f.duncan.m.haldane@xxxxxxxxxxxxxxxx>
Date: 11-Aug-2003
Time: 03:12:16

This message was sent by XFMail
----------------------------------




[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux