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

Commit 56be9f94 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: qdsp6 : vote during slimslave driver release"

parents 04b23645 1b08f02f
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -29,6 +29,12 @@ static int audio_slim_open(struct inode *inode, struct file *file)
{
	pr_debug("%s:\n", __func__);

	if (vote_count) {
		pr_debug("%s: unvote: vote_count=%d\n", __func__, vote_count);
		pm_runtime_mark_last_busy(slim->dev.parent);
		pm_runtime_put(slim->dev.parent);
		vote_count--;
	}
	return 0;
};

@@ -37,9 +43,14 @@ static int audio_slim_release(struct inode *inode, struct file *file)
	pr_debug("%s:\n", __func__);

	if (vote_count) {
		pr_debug("%s: unvote: vote_count=%d\n", __func__, vote_count);
		pm_runtime_mark_last_busy(slim->dev.parent);
		pm_runtime_put(slim->dev.parent);
		vote_count--;
	} else {
		pr_debug("%s: vote: vote_count=%d\n", __func__, vote_count);
		pm_runtime_get_sync(slim->dev.parent);
		vote_count++;
	}
	return 0;
};