The patch number 8782 was added via Hans Verkuil <[EMAIL PROTECTED]> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel If anyone has any objections, please let us know by sending a message to: [EMAIL PROTECTED] ------ From: Hans Verkuil <[EMAIL PROTECTED]> v4l2-dev: add video_device_release_empty Add a second release function: video_device_release_empty It can be used by drivers that have statically allocated video_device structs. Its use usually, but not always, indicates laziness on the part of the driver programmer. Priority: normal Signed-off-by: Hans Verkuil <[EMAIL PROTECTED]> --- linux/drivers/media/video/v4l2-dev.c | 7 +++++++ linux/include/media/v4l2-dev.h | 5 +++++ 2 files changed, 12 insertions(+) diff -r 92f0d8f1655c -r e17900e60d7d linux/drivers/media/video/v4l2-dev.c --- a/linux/drivers/media/video/v4l2-dev.c Sat Aug 23 10:34:55 2008 +0200 +++ b/linux/drivers/media/video/v4l2-dev.c Sat Aug 23 10:47:41 2008 +0200 @@ -90,6 +90,13 @@ void video_device_release(struct video_d kfree(vfd); } EXPORT_SYMBOL(video_device_release); + +void video_device_release_empty(struct video_device *vfd) +{ + /* Do nothing */ + /* Only valid when the video_device struct is a static. */ +} +EXPORT_SYMBOL(video_device_release_empty); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) static void video_release(struct class_device *cd) diff -r 92f0d8f1655c -r e17900e60d7d linux/include/media/v4l2-dev.h --- a/linux/include/media/v4l2-dev.h Sat Aug 23 10:34:55 2008 +0200 +++ b/linux/include/media/v4l2-dev.h Sat Aug 23 10:47:41 2008 +0200 @@ -95,7 +95,12 @@ void video_unregister_device(struct vide /* helper functions to alloc / release struct video_device, the later can be used for video_device->release() */ struct video_device *video_device_alloc(void); +/* this release function frees the vfd pointer */ void video_device_release(struct video_device *vfd); +/* this release function does nothing, use when the video_device is a + static global struct. Note that having a static video_device is + a dubious construction at best. */ +void video_device_release_empty(struct video_device *vfd); #ifdef OBSOLETE_DEVDATA /* to be removed soon */ /* helper functions to access driver private data. */ --- Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/e17900e60d7d40b186098e0cf665da91151a9601 _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits