summaryrefslogtreecommitdiff
path: root/drivers/slimbus
diff options
context:
space:
mode:
authorSagar Dharia <sdharia@codeaurora.org>2016-09-02 17:58:16 -0600
committerSagar Dharia <sdharia@codeaurora.org>2016-09-09 11:02:56 -0600
commite92e3b21942bd3e1acec640380c0a5ad5d9d21de (patch)
treebee0c061aa6f2d6c011bca63b39bf78e4872af4a /drivers/slimbus
parentab26d098793adbf90b77d414663e34ac0c7315f6 (diff)
slim: msm: Avoid registration with notifier if service is not located
Service locator framework may call callback with LOCATOR_UP even if service is not located. Avoid registering with service-notifier in that case. Change-Id: Ib73570d1703803dbe0d769d9d43f9d7d2b257770 Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Diffstat (limited to 'drivers/slimbus')
-rw-r--r--drivers/slimbus/slim-msm-ngd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/slimbus/slim-msm-ngd.c b/drivers/slimbus/slim-msm-ngd.c
index ea4dd2ce4e1d..463dca0e8e9a 100644
--- a/drivers/slimbus/slim-msm-ngd.c
+++ b/drivers/slimbus/slim-msm-ngd.c
@@ -225,6 +225,16 @@ static int dsp_domr_notify_cb(struct notifier_block *n, unsigned long code,
break;
case LOCATOR_UP:
reg = _cmd;
+ if (!reg || reg->total_domains != 1) {
+ SLIM_WARN(dev, "error locating audio-PD\n");
+ if (reg)
+ SLIM_WARN(dev, "audio-PDs matched:%d\n",
+ reg->total_domains);
+
+ /* Fall back to SSR */
+ ngd_reg_ssr(dev);
+ return NOTIFY_DONE;
+ }
dev->dsp.domr = service_notif_register_notifier(
reg->domain_list->name,
reg->domain_list->instance_id,