diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-08-23 10:47:41 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-08-23 10:47:41 +0200 |
commit | 79721c4957171ea0fdaf1fa6565e7699dad1b76e (patch) | |
tree | 2a221ec53f5cbcc834f6afb506d0c76f88578f96 /linux | |
parent | b43528c7ba3da6f260cd3de6ca21c991a012fa6e (diff) | |
download | mediapointer-dvb-s2-79721c4957171ea0fdaf1fa6565e7699dad1b76e.tar.gz mediapointer-dvb-s2-79721c4957171ea0fdaf1fa6565e7699dad1b76e.tar.bz2 |
v4l2-dev: add video_device_release_empty
From: Hans Verkuil <hverkuil@xs4all.nl>
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 <hverkuil@xs4all.nl>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/v4l2-dev.c | 7 | ||||
-rw-r--r-- | linux/include/media/v4l2-dev.h | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/linux/drivers/media/video/v4l2-dev.c b/linux/drivers/media/video/v4l2-dev.c index e2cecec6e..0a4f9085b 100644 --- a/linux/drivers/media/video/v4l2-dev.c +++ b/linux/drivers/media/video/v4l2-dev.c @@ -91,6 +91,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); + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) static void video_release(struct class_device *cd) #else diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index cee043d6a..b6f00b933 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -95,7 +95,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. */ |