soc: qcom: glink_ssr: Add support for ss_info without notify edges

In probe function ss_info requires atleast one notify edge in order
to register for subsystem restart notification callback.

Add support for ss_info to register for subsystem restart notification
callback even if there is no edge to notify.

CRs-Fixed: 2223709
Change-Id: I7fdbce0c4836a18cfce9a30dae379183b3be9b1a
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
This commit is contained in:
Dhoat Harpal 2018-04-10 16:50:14 +05:30
commit 9d9cf5598e

View file

@ -965,13 +965,6 @@ static int glink_ssr_probe(struct platform_device *pdev)
key = "qcom,notify-edges";
while (true) {
phandle_node = of_parse_phandle(node, key, phandle_index++);
if (!phandle_node && phandle_index == 0) {
GLINK_SSR_ERR(
"<SSR> %s: qcom,notify-edges is not present",
__func__);
ret = -ENODEV;
goto notify_edges_not_present;
}
if (!phandle_node)
break;
@ -983,7 +976,7 @@ static int glink_ssr_probe(struct platform_device *pdev)
"<SSR> %s: Could not allocate subsys_info_leaf\n",
__func__);
ret = -ENOMEM;
goto notify_edges_not_present;
goto notify_edges_no_memory;
}
subsys_name = of_get_property(phandle_node, "label", NULL);
@ -1026,7 +1019,7 @@ link_state_register_fail:
list_del(&ss_info->subsystem_list_node);
invalid_dt_node:
kfree(ss_info_leaf);
notify_edges_not_present:
notify_edges_no_memory:
subsys_notif_unregister_notifier(handle, &nb->nb);
delete_ss_info_notify_list(ss_info);
nb_registration_fail: