mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Jinjie Ruan <ruanjinjie@huawei.com>,
	sakari.ailus@linux.intel.com, mchehab@kernel.org,
	ming.qian@nxp.com, eagle.zhou@nxp.com,
	stanimir.k.varbanov@gmail.com, quic_vgarodia@quicinc.com,
	shijie.qin@nxp.com, hverkuil-cisco@xs4all.nl,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Cc: chenridong@huawei.com
Subject: Re: [PATCH v2 2/3] media: amphion: Fix pm_runtime_set_suspended() with runtime pm enabled
Date: Fri, 1 Nov 2024 10:39:35 +0000	[thread overview]
Message-ID: <a2c7d55b-bdaf-4cc1-a653-b398952219f2@linaro.org> (raw)
In-Reply-To: <20241101094050.2421038-3-ruanjinjie@huawei.com>

On 01/11/2024 09:40, Jinjie Ruan wrote:
> It is not valid to call pm_runtime_set_suspended() for devices
> with runtime PM enabled because it returns -EAGAIN if it is enabled
> already and working. So, call pm_runtime_disable() before to fix it.
> 
> Cc: stable@vger.kernel.org
> Fixes: b50a64fc54af ("media: amphion: add amphion vpu device driver")
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> ---
> v2:
> - Add fix tag.
> - Add Cc stable.
> ---
>   drivers/media/platform/amphion/vpu_drv.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/amphion/vpu_drv.c b/drivers/media/platform/amphion/vpu_drv.c
> index 2bf70aafd2ba..51d5234869f5 100644
> --- a/drivers/media/platform/amphion/vpu_drv.c
> +++ b/drivers/media/platform/amphion/vpu_drv.c
> @@ -151,8 +151,8 @@ static int vpu_probe(struct platform_device *pdev)
>   	media_device_cleanup(&vpu->mdev);
>   	v4l2_device_unregister(&vpu->v4l2_dev);
>   err_vpu_deinit:
> -	pm_runtime_set_suspended(dev);
>   	pm_runtime_disable(dev);
> +	pm_runtime_set_suspended(dev);
>   
>   	return ret;
>   }
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

  reply	other threads:[~2024-11-01 10:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-01  9:40 [PATCH v2 0/3] media: " Jinjie Ruan
2024-11-01  9:40 ` [PATCH v2 1/3] media: i2c: dw9768: " Jinjie Ruan
2024-11-01  9:40 ` [PATCH v2 2/3] media: amphion: " Jinjie Ruan
2024-11-01 10:39   ` Bryan O'Donoghue [this message]
2024-11-01  9:40 ` [PATCH v2 3/3] media: venus: " Jinjie Ruan
2024-11-01  9:59   ` Bryan O'Donoghue
2024-11-01 11:02   ` Stanimir Varbanov

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=a2c7d55b-bdaf-4cc1-a653-b398952219f2@linaro.org \
    --to=bryan.odonoghue@linaro.org \
    --cc=chenridong@huawei.com \
    --cc=eagle.zhou@nxp.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ming.qian@nxp.com \
    --cc=quic_vgarodia@quicinc.com \
    --cc=ruanjinjie@huawei.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=shijie.qin@nxp.com \
    --cc=stanimir.k.varbanov@gmail.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

all inboxes | Powered by JetHome®