From: vkoul@kernel.org (Vinod)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] dmaengine: qcom: bam_dma: check if the runtime pm enabled
Date: Thu, 17 May 2018 16:17:48 +0530 [thread overview]
Message-ID: <20180517104748.GY13271@vkoul-mobl> (raw)
In-Reply-To: <20180517094232.27924-1-srinivas.kandagatla@linaro.org>
On 17-05-18, 10:42, Srinivas Kandagatla wrote:
> Disabling pm runtime at probe is not sufficient to get BAM working
> on remotely controller instances. pm_runtime_get_sync() would return
> -EACCES in such cases.
> So check if runtime pm is enabled before returning error from bam functions.
>
> Fixes: 5b4a68952a89 ("dmaengine: qcom: bam_dma: disable runtime pm on remote controlled")
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> drivers/dma/qcom/bam_dma.c | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
> index d29275b97e84..4a828c18099a 100644
> --- a/drivers/dma/qcom/bam_dma.c
> +++ b/drivers/dma/qcom/bam_dma.c
> @@ -524,6 +524,14 @@ static int bam_alloc_chan(struct dma_chan *chan)
> return 0;
> }
>
> +static int bam_pm_runtime_get_sync(struct device *dev)
> +{
> + if (pm_runtime_enabled(dev))
> + return pm_runtime_get_sync(dev);
> +
> + return 0;
> +}
This makes it look lot neater :)
Applied, thanks
--
~Vinod
prev parent reply other threads:[~2018-05-17 10:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 9:42 [PATCH v2] dmaengine: qcom: bam_dma: check if the runtime pm enabled Srinivas Kandagatla
2018-05-17 10:47 ` Vinod [this message]
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=20180517104748.GY13271@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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