From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: <linuxarm@huawei.com>, <mauro.chehab@huawei.com>,
Ezequiel Garcia <ezequiel@collabora.com>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-media@vger.kernel.org>,
<linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH v4 63/79] media: exynos-gsc: use pm_runtime_resume_and_get()
Date: Fri, 30 Apr 2021 18:50:01 +0100 [thread overview]
Message-ID: <20210430185001.00005e76@Huawei.com> (raw)
In-Reply-To: <31bdadf2f59e86c6a315ec390b44c6c681af6647.1619621413.git.mchehab+huawei@kernel.org>
On Wed, 28 Apr 2021 16:52:24 +0200
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote:
> Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter")
> added pm_runtime_resume_and_get() in order to automatically handle
> dev->power.usage_count decrement on errors.
>
> Use the new API, in order to cleanup the error check logic.
>
> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
> drivers/media/platform/exynos-gsc/gsc-m2m.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/exynos-gsc/gsc-m2m.c b/drivers/media/platform/exynos-gsc/gsc-m2m.c
> index 27a3c92c73bc..09551e96ac15 100644
> --- a/drivers/media/platform/exynos-gsc/gsc-m2m.c
> +++ b/drivers/media/platform/exynos-gsc/gsc-m2m.c
> @@ -58,7 +58,7 @@ static int gsc_m2m_start_streaming(struct vb2_queue *q, unsigned int count)
> struct gsc_ctx *ctx = q->drv_priv;
> int ret;
>
> - ret = pm_runtime_get_sync(&ctx->gsc_dev->pdev->dev);
> + ret = pm_runtime_resume_and_get(&ctx->gsc_dev->pdev->dev);
> return ret > 0 ? 0 : ret;
return pm_runtime_resume_and_get()
as
static inline int pm_runtime_resume_and_get(struct device *dev)
{
int ret;
ret = __pm_runtime_resume(dev, RPM_GET_PUT);
if (ret < 0) {
pm_runtime_put_noidle(dev);
return ret;
}
return 0;
}
Can't return >= 0
> }
>
next prev parent reply other threads:[~2021-04-30 17:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-28 14:51 [PATCH v4 00/79] Address some issues with PM runtime at media subsystem Mauro Carvalho Chehab
2021-04-28 14:51 ` [PATCH v4 02/79] media: s6p_cec: decrement usage count if disabled Mauro Carvalho Chehab
2021-04-28 15:31 ` Sylwester Nawrocki
2021-04-28 14:51 ` [PATCH v4 07/79] media: exynos-gsc: don't resume at remove time Mauro Carvalho Chehab
2021-04-28 15:25 ` Sylwester Nawrocki
2021-04-28 19:44 ` kernel test robot
2021-04-28 19:56 ` kernel test robot
2021-04-28 14:51 ` [PATCH v4 13/79] media: s5p: fix pm_runtime_get_sync() usage count Mauro Carvalho Chehab
2021-04-28 14:52 ` [PATCH v4 62/79] media: exynos4-is: use pm_runtime_resume_and_get() Mauro Carvalho Chehab
2021-04-30 17:49 ` Jonathan Cameron
2021-04-28 14:52 ` [PATCH v4 63/79] media: exynos-gsc: " Mauro Carvalho Chehab
2021-04-30 17:50 ` Jonathan Cameron [this message]
2021-04-28 14:52 ` [PATCH v4 71/79] media: s3c-camif: " Mauro Carvalho Chehab
2021-04-28 15:50 ` [PATCH v4 00/79] Address some issues with PM runtime at media subsystem Johan Hovold
2021-04-29 10:18 ` Mauro Carvalho Chehab
2021-04-29 12:33 ` Dmitry Osipenko
2021-04-29 15:17 ` Johan Hovold
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=20210430185001.00005e76@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=ezequiel@collabora.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mauro.chehab@huawei.com \
--cc=mchehab+huawei@kernel.org \
--cc=mchehab@kernel.org \
--cc=s.nawrocki@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox