mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 04:59:05 -04:00
qcacmn: Enhance Runtime PM wakelock logging
It helps to track runtime PM wakelock allocation for each user. Change-Id: I4d49c687fdd1dd3618f96f18acdaa9dad4197d74 CRs-fixed: 2152497
This commit is contained in:
parent
ba29129dfb
commit
b4e12686e6
1 changed files with 10 additions and 2 deletions
|
|
@ -4393,9 +4393,11 @@ int hif_runtime_lock_init(qdf_runtime_lock_t *lock, const char *name)
|
|||
{
|
||||
struct hif_pm_runtime_lock *context;
|
||||
|
||||
HIF_INFO("Initializing Runtime PM wakelock %s", name);
|
||||
|
||||
context = qdf_mem_malloc(sizeof(*context));
|
||||
if (!context) {
|
||||
HIF_ERROR("%s: No memory for Runtime PM wakelock context\n",
|
||||
HIF_ERROR("%s: No memory for Runtime PM wakelock context",
|
||||
__func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
@ -4418,8 +4420,13 @@ void hif_runtime_lock_deinit(struct hif_opaque_softc *hif_ctx,
|
|||
struct hif_pm_runtime_lock *context = data;
|
||||
struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(hif_ctx);
|
||||
|
||||
if (!context)
|
||||
if (!context) {
|
||||
HIF_ERROR("Runtime PM wakelock context is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
HIF_INFO("Deinitializing Runtime PM wakelock %s", context->name);
|
||||
|
||||
/*
|
||||
* Ensure to delete the context list entry and reduce the usage count
|
||||
* before freeing the context if context is active.
|
||||
|
|
@ -4429,6 +4436,7 @@ void hif_runtime_lock_deinit(struct hif_opaque_softc *hif_ctx,
|
|||
__hif_pm_runtime_allow_suspend(sc, context);
|
||||
spin_unlock_bh(&sc->runtime_lock);
|
||||
}
|
||||
|
||||
qdf_mem_free(context);
|
||||
}
|
||||
#endif /* FEATURE_RUNTIME_PM */
|
||||
|
|
|
|||
Loading…
Reference in a new issue