From 948e804fa7ae22f43a85044e0aba5270789dac36 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 23 Aug 2008 05:47:41 -0300 Subject: [PATCH] --- yaml --- r: 113863 b: refs/heads/master c: f9e86b5e9d068854a2cf40f8003ef639e80cca6c h: refs/heads/master i: 113861: c74156980fc05f55bfdf0ed895169cda68cbe6f1 113859: 679dffe39b6b6b0c80e539aee97117fb2a6f7c9e 113855: 9be43e4b47721a67d9693219b4855afffa6ed4f2 v: v3 --- [refs] | 2 +- trunk/drivers/media/video/v4l2-dev.c | 7 +++++++ trunk/include/media/v4l2-dev.h | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 3fe821f92bef..4a4b28a8f244 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cb353588e1946ab709be57dd8545598793acf912 +refs/heads/master: f9e86b5e9d068854a2cf40f8003ef639e80cca6c diff --git a/trunk/drivers/media/video/v4l2-dev.c b/trunk/drivers/media/video/v4l2-dev.c index 66bd74b58b06..fda48a2efda6 100644 --- a/trunk/drivers/media/video/v4l2-dev.c +++ b/trunk/drivers/media/video/v4l2-dev.c @@ -73,6 +73,13 @@ void video_device_release(struct video_device *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); + static void video_release(struct device *cd) { struct video_device *vfd = container_of(cd, struct video_device, dev); diff --git a/trunk/include/media/v4l2-dev.h b/trunk/include/media/v4l2-dev.h index e472b5d07a55..30855077be44 100644 --- a/trunk/include/media/v4l2-dev.h +++ b/trunk/include/media/v4l2-dev.h @@ -91,7 +91,12 @@ void video_unregister_device(struct video_device *); /* 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. */