mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacmn: Do not get/put the pm_runtime if RPM is disabled
Do not get/put the pm_runtime if RPM is not enabled to avoid the WMI command sending block. Change-Id: Id6cddc4d5b6322fea063f08a1b641034ba0272d9 CRs-Fixed: 2587797
This commit is contained in:
parent
5cd2e56349
commit
0778a3973d
1 changed files with 20 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -3912,6 +3912,9 @@ int hif_pm_runtime_get_sync(struct hif_opaque_softc *hif_ctx)
|
|||
if (!sc)
|
||||
return -EINVAL;
|
||||
|
||||
if (!pm_runtime_enabled(sc->dev))
|
||||
return 0;
|
||||
|
||||
pm_state = qdf_atomic_read(&sc->pm_state);
|
||||
if (pm_state == HIF_PM_RUNTIME_STATE_SUSPENDED ||
|
||||
pm_state == HIF_PM_RUNTIME_STATE_SUSPENDING)
|
||||
|
|
@ -3956,6 +3959,9 @@ int hif_pm_runtime_put_sync_suspend(struct hif_opaque_softc *hif_ctx)
|
|||
if (!sc)
|
||||
return -EINVAL;
|
||||
|
||||
if (!pm_runtime_enabled(sc->dev))
|
||||
return 0;
|
||||
|
||||
usage_count = atomic_read(&sc->dev->power.usage_count);
|
||||
if (usage_count == 1) {
|
||||
pm_state = qdf_atomic_read(&sc->pm_state);
|
||||
|
|
@ -3982,6 +3988,9 @@ int hif_pm_runtime_request_resume(struct hif_opaque_softc *hif_ctx)
|
|||
if (!sc)
|
||||
return -EINVAL;
|
||||
|
||||
if (!pm_runtime_enabled(sc->dev))
|
||||
return 0;
|
||||
|
||||
pm_state = qdf_atomic_read(&sc->pm_state);
|
||||
if (pm_state == HIF_PM_RUNTIME_STATE_SUSPENDED ||
|
||||
pm_state == HIF_PM_RUNTIME_STATE_SUSPENDING)
|
||||
|
|
@ -4014,6 +4023,9 @@ void hif_pm_runtime_get_noresume(struct hif_opaque_softc *hif_ctx)
|
|||
if (!sc)
|
||||
return;
|
||||
|
||||
if (!pm_runtime_enabled(sc->dev))
|
||||
return;
|
||||
|
||||
sc->pm_stats.runtime_get++;
|
||||
pm_runtime_get_noresume(sc->dev);
|
||||
}
|
||||
|
|
@ -4043,6 +4055,9 @@ int hif_pm_runtime_get(struct hif_opaque_softc *hif_ctx)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (!pm_runtime_enabled(sc->dev))
|
||||
return 0;
|
||||
|
||||
pm_state = qdf_atomic_read(&sc->pm_state);
|
||||
|
||||
if (pm_state == HIF_PM_RUNTIME_STATE_ON ||
|
||||
|
|
@ -4107,6 +4122,10 @@ int hif_pm_runtime_put(struct hif_opaque_softc *hif_ctx)
|
|||
__func__);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (!pm_runtime_enabled(sc->dev))
|
||||
return 0;
|
||||
|
||||
usage_count = atomic_read(&sc->dev->power.usage_count);
|
||||
|
||||
if (usage_count == 1) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue