OSDN Git Service

misc: qseecom: Support qseecom deferred probing
authorAmit Blay <ablay@codeaurora.org>
Tue, 25 Jul 2017 07:38:33 +0000 (10:38 +0300)
committerGerrit - the friendly Code Review server <code-review@localhost>
Tue, 25 Jul 2017 07:42:09 +0000 (00:42 -0700)
During qseecom driver probing, the ION driver is invoked.
This commit supports the case where the ION driver still hasn't
probed. In that case, the qseecom probing will be deferred, and
retried at a later stage.

Change-Id: Ic780e8fa1d48a9f5b8b98773c034b280475f5fd0
Signed-off-by: Amit Blay <ablay@codeaurora.org>
drivers/misc/qseecom.c

index 66f3c9f..7bc5b5a 100644 (file)
@@ -8530,7 +8530,11 @@ static int qseecom_probe(struct platform_device *pdev)
        qseecom.ion_clnt = msm_ion_client_create("qseecom-kernel");
        if (IS_ERR_OR_NULL(qseecom.ion_clnt)) {
                pr_err("Ion client cannot be created\n");
-               rc = -ENOMEM;
+
+               if (qseecom.ion_clnt != ERR_PTR(-EPROBE_DEFER))
+                       rc = -ENOMEM;
+               else
+                       rc = -EPROBE_DEFER;
                goto exit_del_cdev;
        }