ASoC: Intel: avs: Simplify d0ix disabling routine
No need to atomic_add_return(1) when there is atomic_inc_return() available. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221010121955.718168-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d1356811ab
commit
e720e68b3f
|
@ -74,7 +74,7 @@ int avs_dsp_disable_d0ix(struct avs_dev *adev)
|
|||
struct avs_ipc *ipc = adev->ipc;
|
||||
|
||||
/* Prevent PG only on the first disable. */
|
||||
if (atomic_add_return(1, &ipc->d0ix_disable_depth) == 1) {
|
||||
if (atomic_inc_return(&ipc->d0ix_disable_depth) == 1) {
|
||||
cancel_delayed_work_sync(&ipc->d0ix_work);
|
||||
return avs_dsp_set_d0ix(adev, false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue