Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Bard Liao <yung-chuan.liao@linux.intel.com>,
	alsa-devel@alsa-project.org,  vkoul@kernel.org
Cc: vinod.koul@linaro.org, gregkh@linuxfoundation.org,
	pierre-louis.bossart@linux.intel.com,
	linux-kernel@vger.kernel.org, sanyog.r.kale@intel.com,
	bard.liao@intel.com
Subject: Re: [PATCH 5/5] soundwire: qcom: use pm_runtime_resume_and_get()
Date: Fri, 29 Apr 2022 16:59:42 +0100	[thread overview]
Message-ID: <d18fb6ea-6da6-cab3-1aca-48cbfcc74efa@linaro.org> (raw)
In-Reply-To: <20220426235623.4253-6-yung-chuan.liao@linux.intel.com>



On 27/04/2022 00:56, Bard Liao wrote:
> From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> 
> Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and
> pm_runtime_put_noidle() pattern.
> 
> No functional changes.
> 
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
> ---
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

>   drivers/soundwire/qcom.c | 15 ++++++---------
>   1 file changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
> index c40c25f2d264..c244d31805cc 100644
> --- a/drivers/soundwire/qcom.c
> +++ b/drivers/soundwire/qcom.c
> @@ -510,12 +510,11 @@ static irqreturn_t qcom_swrm_wake_irq_handler(int irq, void *dev_id)
>   	struct qcom_swrm_ctrl *swrm = dev_id;
>   	int ret;
>   
> -	ret = pm_runtime_get_sync(swrm->dev);
> +	ret = pm_runtime_resume_and_get(swrm->dev);
>   	if (ret < 0 && ret != -EACCES) {
>   		dev_err_ratelimited(swrm->dev,
> -				    "pm_runtime_get_sync failed in %s, ret %d\n",
> +				    "pm_runtime_resume_and_get failed in %s, ret %d\n",
>   				    __func__, ret);
> -		pm_runtime_put_noidle(swrm->dev);
>   		return ret;
>   	}
>   
> @@ -1059,12 +1058,11 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream,
>   	struct snd_soc_dai *codec_dai;
>   	int ret, i;
>   
> -	ret = pm_runtime_get_sync(ctrl->dev);
> +	ret = pm_runtime_resume_and_get(ctrl->dev);
>   	if (ret < 0 && ret != -EACCES) {
>   		dev_err_ratelimited(ctrl->dev,
> -				    "pm_runtime_get_sync failed in %s, ret %d\n",
> +				    "pm_runtime_resume_and_get failed in %s, ret %d\n",
>   				    __func__, ret);
> -		pm_runtime_put_noidle(ctrl->dev);
>   		return ret;
>   	}
>   
> @@ -1253,12 +1251,11 @@ static int swrm_reg_show(struct seq_file *s_file, void *data)
>   	struct qcom_swrm_ctrl *swrm = s_file->private;
>   	int reg, reg_val, ret;
>   
> -	ret = pm_runtime_get_sync(swrm->dev);
> +	ret = pm_runtime_resume_and_get(swrm->dev);
>   	if (ret < 0 && ret != -EACCES) {
>   		dev_err_ratelimited(swrm->dev,
> -				    "pm_runtime_get_sync failed in %s, ret %d\n",
> +				    "pm_runtime_resume_and_get failed in %s, ret %d\n",
>   				    __func__, ret);
> -		pm_runtime_put_noidle(swrm->dev);
>   		return ret;
>   	}
>   

  reply	other threads:[~2022-04-29 16:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26 23:56 [PATCH 0/5] soundwire: use pm_runtime_resume_and_get() Bard Liao
2022-04-26 23:56 ` [PATCH 1/5] soundwire: qcom: return error when pm_runtime_get_sync fails Bard Liao
2022-04-29 15:59   ` Srinivas Kandagatla
2022-04-26 23:56 ` [PATCH 2/5] soundwire: bus: use pm_runtime_resume_and_get() Bard Liao
2022-04-26 23:56 ` [PATCH 3/5] soundwire: cadence: " Bard Liao
2022-04-26 23:56 ` [PATCH 4/5] soundwire: intel: " Bard Liao
2022-04-26 23:56 ` [PATCH 5/5] soundwire: qcom: " Bard Liao
2022-04-29 15:59   ` Srinivas Kandagatla [this message]
2022-05-09  6:32 ` [PATCH 0/5] soundwire: " Vinod Koul

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=d18fb6ea-6da6-cab3-1aca-48cbfcc74efa@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bard.liao@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=sanyog.r.kale@intel.com \
    --cc=vinod.koul@linaro.org \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox