static int myvivi_close(struct file *file) { del_timer(&myvivi_timer); videobuf_stop(&myvivi_vb_vidquene); videobuf_mmap_free(&myvivi_vb_vidquene); return 0; }
static int solo_v4l2_release(struct file *file) { struct solo_filehandle *fh = file->private_data; videobuf_stop(&fh->vidq); videobuf_mmap_free(&fh->vidq); solo_stop_thread(fh); kfree(fh); return 0; }
static void video_close(struct saa7146_dev *dev, struct file *file) { struct saa7146_fh *fh = file->private_data; struct saa7146_vv *vv = dev->vv_data; struct videobuf_queue *q = &fh->video_q; if (IS_CAPTURE_ACTIVE(fh) != 0) video_end(fh, file); else if (IS_OVERLAY_ACTIVE(fh) != 0) saa7146_stop_preview(fh); videobuf_stop(q); /* hmm, why is this function declared void? */ }
static int ts_release(struct inode *inode, struct file *file) { struct saa7134_dev *dev = file->private_data; videobuf_stop(&dev->empress_tsq); videobuf_mmap_free(&dev->empress_tsq); dev->empress_users--; /* stop the encoder */ ts_reset_encoder(dev); /* Mute audio */ saa_writeb(SAA7134_AUDIO_MUTE_CTRL, saa_readb(SAA7134_AUDIO_MUTE_CTRL) | (1 << 6)); return 0; }
static int fimc_capture_close(struct file *file) { struct fimc_dev *fimc = video_drvdata(file); if (mutex_lock_interruptible(&fimc->lock)) return -ERESTARTSYS; dbg("pid: %d, state: 0x%lx", task_pid_nr(current), fimc->state); if (--fimc->vid_cap.refcnt == 0) { fimc_stop_capture(fimc); videobuf_stop(&fimc->vid_cap.vbq); videobuf_mmap_free(&fimc->vid_cap.vbq); v4l2_err(&fimc->vid_cap.v4l2_dev, "releasing ISP\n"); v4l2_subdev_call(fimc->vid_cap.sd, core, s_power, 0); fimc_subdev_unregister(fimc); } mutex_unlock(&fimc->lock); return 0; }
static int marucam_close(struct file *file) { int ret; struct marucam_device *dev = file->private_data; mutex_lock(&dev->mlock); if (dev->opstate == S_RUNNING) { marucam_err("The device has been terminated unexpectedly.\n"); iowrite32(1, dev->mmregs + MARUCAM_STOP_PREVIEW); ret = (int)ioread32(dev->mmregs + MARUCAM_STOP_PREVIEW); if (ret) { marucam_err("Failed to stop the preview\n"); mutex_unlock(&dev->mlock); return -ret; } dev->opstate = S_IDLE; } videobuf_stop(&dev->vb_vidq); videobuf_mmap_free(&dev->vb_vidq); INIT_LIST_HEAD(&dev->active); free_irq(dev->pdev->irq, dev); iowrite32(0, dev->mmregs + MARUCAM_CLOSE); ret = (int)ioread32(dev->mmregs + MARUCAM_CLOSE); if (ret) { marucam_err("Failed to close the device\n"); mutex_unlock(&dev->mlock); return -ret; } dev->in_use = 0; mutex_unlock(&dev->mlock); return 0; }
static int myvivi_close(struct file *file) { videobuf_stop(&myvivi_vb_vidqueue); videobuf_mmap_free(&myvivi_vb_vidqueue); }