All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: sakari.ailus@linux.intel.com, Hans Verkuil <hans.verkuil@cisco.com>
Subject: [RFC PATCH 4/7] am437x-vpfe/fimc-capture: always return 0 on close
Date: Fri, 24 Jul 2015 12:21:33 +0200	[thread overview]
Message-ID: <1437733296-38198-5-git-send-email-hverkuil@xs4all.nl> (raw)
In-Reply-To: <1437733296-38198-1-git-send-email-hverkuil@xs4all.nl>

From: Hans Verkuil <hans.verkuil@cisco.com>

When the filehandle is closed always return 0 and ignore the return
code from _vb2_fop_release().

Currently _vb2_fop_release() always returns 0, but this will change in
the next patch where _vb2_fop_release() will return a boolean telling the
caller if this was the last open filehandle that is closed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/media/platform/am437x/am437x-vpfe.c      | 5 ++---
 drivers/media/platform/exynos4-is/fimc-capture.c | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
index c8447fa..210c779 100644
--- a/drivers/media/platform/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/am437x/am437x-vpfe.c
@@ -1187,7 +1187,6 @@ static int vpfe_release(struct file *file)
 {
 	struct vpfe_device *vpfe = video_drvdata(file);
 	bool fh_singular;
-	int ret;
 
 	mutex_lock(&vpfe->lock);
 
@@ -1195,7 +1194,7 @@ static int vpfe_release(struct file *file)
 	fh_singular = v4l2_fh_is_singular_file(file);
 
 	/* the release helper will cleanup any on-going streaming */
-	ret = _vb2_fop_release(file, NULL);
+	_vb2_fop_release(file, NULL);
 
 	/*
 	 * If this was the last open file.
@@ -1206,7 +1205,7 @@ static int vpfe_release(struct file *file)
 
 	mutex_unlock(&vpfe->lock);
 
-	return ret;
+	return 0;
 }
 
 /*
diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c
index cfebf29..f4458b0 100644
--- a/drivers/media/platform/exynos4-is/fimc-capture.c
+++ b/drivers/media/platform/exynos4-is/fimc-capture.c
@@ -538,7 +538,6 @@ static int fimc_capture_release(struct file *file)
 	struct fimc_dev *fimc = video_drvdata(file);
 	struct fimc_vid_cap *vc = &fimc->vid_cap;
 	bool close = v4l2_fh_is_singular_file(file);
-	int ret;
 
 	dbg("pid: %d, state: 0x%lx", task_pid_nr(current), fimc->state);
 
@@ -549,7 +548,7 @@ static int fimc_capture_release(struct file *file)
 		vc->streaming = false;
 	}
 
-	ret = _vb2_fop_release(file, NULL);
+	_vb2_fop_release(file, NULL);
 
 	if (close) {
 		clear_bit(ST_CAPT_BUSY, &fimc->state);
@@ -564,7 +563,7 @@ static int fimc_capture_release(struct file *file)
 	pm_runtime_put_sync(&fimc->pdev->dev);
 	mutex_unlock(&fimc->lock);
 
-	return ret;
+	return 0;
 }
 
 static const struct v4l2_file_operations fimc_capture_fops = {
-- 
2.1.4


  parent reply	other threads:[~2015-07-24 10:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24 10:21 [RFC PATCH 0/7] Simplify first open/last close checks Hans Verkuil
2015-07-24 10:21 ` [RFC PATCH 1/7] v4l2-fh: change int to bool for v4l2_fh_is_singular(_file) Hans Verkuil
2015-07-25 22:13   ` Sakari Ailus
2015-07-24 10:21 ` [RFC PATCH 2/7] v4l2-fh: v4l2_fh_add/del now return whether it was the first or last fh Hans Verkuil
2015-07-25 22:13   ` Sakari Ailus
2015-07-24 10:21 ` [RFC PATCH 3/7] v4l2-fh: add v4l2_fh_open_is_first and v4l2_fh_release_is_last Hans Verkuil
2015-07-25 22:42   ` Sakari Ailus
2015-07-28 10:16     ` Hans Verkuil
2015-07-24 10:21 ` Hans Verkuil [this message]
2015-07-24 10:21 ` [RFC PATCH 5/7] vb2: _vb2_fop_release returns if this was the last fh Hans Verkuil
2015-07-24 10:21 ` [RFC PATCH 6/7] am437x/exynos4-is/marvell-ccic/sh_vou: simplify release() Hans Verkuil
2015-07-24 10:21 ` [RFC PATCH 7/7] cpia2/si470x: simplify open Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1437733296-38198-5-git-send-email-hverkuil@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.