mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
Merge "icnss2: Avoid race between SOC WAKE REQ/RESP"
This commit is contained in:
commit
bb2468e73f
1 changed files with 3 additions and 4 deletions
|
|
@ -2338,7 +2338,6 @@ EXPORT_SYMBOL(icnss_set_fw_log_mode);
|
|||
int icnss_force_wake_request(struct device *dev)
|
||||
{
|
||||
struct icnss_priv *priv = dev_get_drvdata(dev);
|
||||
int count = 0;
|
||||
|
||||
if (!dev)
|
||||
return -ENODEV;
|
||||
|
|
@ -2348,9 +2347,9 @@ int icnss_force_wake_request(struct device *dev)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (atomic_read(&priv->soc_wake_ref_count)) {
|
||||
count = atomic_inc_return(&priv->soc_wake_ref_count);
|
||||
icnss_pr_dbg("SOC already awake, Ref count: %d", count);
|
||||
if (atomic_inc_not_zero(&priv->soc_wake_ref_count)) {
|
||||
icnss_pr_dbg("SOC already awake, Ref count: %d",
|
||||
atomic_read(&priv->soc_wake_ref_count));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue