lists.zerezo.com



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

Re: [RFT v2] stk-webcam: Fix video_device handling



On Tue, Jul 1, 2008 at 1:13 PM, Jaime Velasco Juan
<jsagarribay@xxxxxxxxx> wrote:
> Hi David,
>
> it seems to work ok now with your other patch, but if the video_device
> struct is going to be ref. counted, wouldn't it make sense to drop the
> kref in the driver and free all resources in the release callback? With
> these changes there are two krefs which are created, get and put at the
> same time and for the same purpose.
>
I noticed this as well and was actually working on a patch which would
have removed the kref from the stk_camera since it would no longer
have been needed.

> I also like better the video_device struct embedded in the main
> stk_camera struct (as it is now), but if people prefer having it
> referenced with a pointer, so be it.
>
Agreed. The next patch I submit will keep the video_device struct in
the stk_camera struct as it really doesn't need to be allocated using
video_device_alloc().

> Regards,
>
> Jaime

I'm currently working to correct the kobject reference count in
videodev which was previously patched by using a kref. The resulting
behavior should be the same, but the code will be much simpler to
understand. Once I have this working I will submit a proper patch for
stk-webcam as well.

Regards,

David Ellingsworth

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list