summaryrefslogtreecommitdiff
path: root/drivers/media/video/ivtv/ivtv-streams.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-05-14 13:31:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-14 13:31:25 -0700
commit4717df58304b60ac26cdb157d57f39ae1e3a336f (patch)
tree9cf37756aca53f79702a90b062369d60c7c97eff /drivers/media/video/ivtv/ivtv-streams.c
parentfc99824c427ed998e3c5e376bd9c640fde1c407c (diff)
parentc2b7bbea83b239b1877f3cafe0cdcbbd08e65648 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (70 commits) V4L/DVB (7900): pvrusb: Fix Kconfig if DVB=m V4L_core=y V4L/DVB (7899): Fixes a few remaining Kbuild issues at common/tuners V4L/DVB (7898): Fix VIDEO_MEDIA Kconfig logic V4L/DVB (7895): tveeprom: update Hauppauge analog audio and video decoders V4L/DVB (7893): xc5000: bug-fix: allow multiple devices in a single system V4L/DVB (7891): cx18/ivtv: fix open() kernel oops V4L/DVB (7890): cx18: removed bogus and confusing conditional V4L/DVB (7889): cx18: improve HVR-1600 detection. V4L/DVB (7888): cx18: minor card definition updates. V4L/DVB (7887): cx18: fix Compro H900 analog support. V4L/DVB (7881): saa7134: fixed a compile warning in saa7134-core.c V4L/DVB (7880): saa7134: remove explicit GPIO initialization V4L/DVB(7879): Adding cx18 Support for mxl5005s V4L/DVB(7878): mxl55005s: Makefile and Kconfig additions V4L/DVB(7877): mxl5005s: Ensure debug is off V4L/DVB(7876): mxl5005s: Remove incorrect copyright holders V4L/DVB(7875): mxl5005s: Remove redundant functions V4L/DVB(7874): mxl5005s: Fix function statics V4L/DVB(7873): mxl5005s: Fix header includes. V4L/DVB(7872): mxl5005s: checkpatch.pl compliance ...
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-streams.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-streams.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c
index 4ab8d36831ba..c47c2b945147 100644
--- a/drivers/media/video/ivtv/ivtv-streams.c
+++ b/drivers/media/video/ivtv/ivtv-streams.c
@@ -244,7 +244,7 @@ int ivtv_streams_setup(struct ivtv *itv)
return 0;
/* One or more streams could not be initialized. Clean 'em all up. */
- ivtv_streams_cleanup(itv);
+ ivtv_streams_cleanup(itv, 0);
return -ENOMEM;
}
@@ -304,12 +304,12 @@ int ivtv_streams_register(struct ivtv *itv)
return 0;
/* One or more streams could not be initialized. Clean 'em all up. */
- ivtv_streams_cleanup(itv);
+ ivtv_streams_cleanup(itv, 1);
return -ENOMEM;
}
/* Unregister v4l2 devices */
-void ivtv_streams_cleanup(struct ivtv *itv)
+void ivtv_streams_cleanup(struct ivtv *itv, int unregister)
{
int type;
@@ -322,8 +322,11 @@ void ivtv_streams_cleanup(struct ivtv *itv)
continue;
ivtv_stream_free(&itv->streams[type]);
- /* Unregister device */
- video_unregister_device(vdev);
+ /* Unregister or release device */
+ if (unregister)
+ video_unregister_device(vdev);
+ else
+ video_device_release(vdev);
}
}