icnss2: Unregister AON event notifier

Unregister AON event notifier.

Change-Id: Ic247f7dc1a2672ccca54dac0dbef1d8dbec22fb1
CRs-Fixed: 3522232
This commit is contained in:
Dundi Raviteja
2023-06-07 12:04:26 +05:30
committed by Rahul Choudhary
parent 6ce40d5c60
commit 0fcf684c10
2 changed files with 23 additions and 6 deletions

View File

@@ -2350,6 +2350,8 @@ static int icnss_wpss_ssr_register_notifier(struct icnss_priv *priv)
static int icnss_slate_event_notifier_nb(struct notifier_block *nb,
unsigned long event, void *data)
{
icnss_pr_info("Received slate event 0x%x\n", event);
if (event == SLATE_STATUS) {
struct icnss_priv *priv = container_of(nb, struct icnss_priv,
seb_nb);
@@ -2384,6 +2386,17 @@ static int icnss_register_slate_event_notifier(struct icnss_priv *priv)
return ret;
}
static int icnss_unregister_slate_event_notifier(struct icnss_priv *priv)
{
int ret = 0;
ret = seb_unregister_for_slate_event(priv->seb_handle, &priv->seb_nb);
if (ret < 0)
icnss_pr_err("Slate event unregister failed: %d\n", ret);
return ret;
}
static int icnss_slate_notifier_nb(struct notifier_block *nb,
unsigned long code,
void *data)
@@ -2458,6 +2471,11 @@ static int icnss_register_slate_event_notifier(struct icnss_priv *priv)
return 0;
}
static int icnss_unregister_slate_event_notifier(struct icnss_priv *priv)
{
return 0;
}
static int icnss_slate_ssr_register_notifier(struct icnss_priv *priv)
{
return 0;
@@ -4811,8 +4829,10 @@ static int icnss_remove(struct platform_device *pdev)
complete_all(&priv->unblock_shutdown);
if (priv->is_slate_rfa)
if (priv->is_slate_rfa) {
icnss_slate_ssr_unregister_notifier(priv);
icnss_unregister_slate_event_notifier(priv);
}
icnss_destroy_ramdump_device(priv->msa0_dump_dev);