dmaengine: qcom: bam_dma: make bam clk optional

When BAM is remotely controlled it does not sound correct to control
its clk on Linux side. Make it optional, so that its not mandatory
for remote controlled BAM instances.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
Srinivas Kandagatla 2018-02-15 12:25:07 +00:00 коммит произвёл Vinod Koul
Родитель 7928b2cbe5
Коммит 9d31821fa9
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -1233,8 +1233,12 @@ static int bam_dma_probe(struct platform_device *pdev)
"qcom,controlled-remotely"); "qcom,controlled-remotely");
bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk"); bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk");
if (IS_ERR(bdev->bamclk)) if (IS_ERR(bdev->bamclk)) {
return PTR_ERR(bdev->bamclk); if (!bdev->controlled_remotely)
return PTR_ERR(bdev->bamclk);
bdev->bamclk = NULL;
}
ret = clk_prepare_enable(bdev->bamclk); ret = clk_prepare_enable(bdev->bamclk);
if (ret) { if (ret) {