soc: qcom: rmtfs-mem: Validate that scm is available
The scm device must be present in order for the rmtfs driver to
configure memory permissions for the rmtfs memory region, so check that
it is probed before continuing.
Cc: stable@vger.kernel.org
Fixes: fa65f80451
("soc: qcom: rmtfs-mem: Add support for assigning memory to remote")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
This commit is contained in:
Родитель
61a3bd1008
Коммит
137dc5843f
|
@ -212,6 +212,11 @@ static int qcom_rmtfs_mem_probe(struct platform_device *pdev)
|
||||||
dev_err(&pdev->dev, "failed to parse qcom,vmid\n");
|
dev_err(&pdev->dev, "failed to parse qcom,vmid\n");
|
||||||
goto remove_cdev;
|
goto remove_cdev;
|
||||||
} else if (!ret) {
|
} else if (!ret) {
|
||||||
|
if (!qcom_scm_is_available()) {
|
||||||
|
ret = -EPROBE_DEFER;
|
||||||
|
goto remove_cdev;
|
||||||
|
}
|
||||||
|
|
||||||
perms[0].vmid = QCOM_SCM_VMID_HLOS;
|
perms[0].vmid = QCOM_SCM_VMID_HLOS;
|
||||||
perms[0].perm = QCOM_SCM_PERM_RW;
|
perms[0].perm = QCOM_SCM_PERM_RW;
|
||||||
perms[1].vmid = vmid;
|
perms[1].vmid = vmid;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче