Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2022f3d1 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: adsprpc: remove PM vote counter in fastrpc driver"

parents 4a6f61d1 977be972
Loading
Loading
Loading
Loading
+3 −15
Original line number Diff line number Diff line
@@ -371,7 +371,6 @@ struct fastrpc_apps {
	/* Unique job id for each message */
	uint64_t jobid[NUM_CHANNELS];
	struct wakeup_source *wake_source;
	unsigned int wake_count;
};

struct fastrpc_mmap {
@@ -2060,14 +2059,9 @@ static inline void fastrpc_pm_awake(int fl_wake_enable, bool *pm_awake_voted)
{
	struct fastrpc_apps *me = &gfa;

	if (!fl_wake_enable)
	if (!fl_wake_enable || *pm_awake_voted)
		return;

	spin_lock(&me->hlock);
	if (!me->wake_count)
	__pm_stay_awake(me->wake_source);
	me->wake_count++;
	spin_unlock(&me->hlock);
	*pm_awake_voted = true;
}

@@ -2077,13 +2071,7 @@ static inline void fastrpc_pm_relax(bool *pm_awake_voted)

	if (!(*pm_awake_voted))
		return;

	spin_lock(&me->hlock);
	if (me->wake_count)
		me->wake_count--;
	if (!me->wake_count)
	__pm_relax(me->wake_source);
	spin_unlock(&me->hlock);
	*pm_awake_voted = false;
}