Skip to content

Commit fbb74e5

Browse files
tmlindbroonie
authored andcommitted
ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings
We need to check for an active device as otherwise we get warnings for some mcbsp instances for "Runtime PM usage count underflow!". Reported-by: Andreas Kemnade <andreas@kemnade.info> Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20231030052340.13415-1-tony@atomide.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent bdb7e19 commit fbb74e5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sound/soc/ti/omap-mcbsp.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,16 @@ static int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id)
7373
return 0;
7474
}
7575

76-
pm_runtime_put_sync(mcbsp->dev);
76+
if (mcbsp->active)
77+
pm_runtime_put_sync(mcbsp->dev);
7778

7879
r = clk_set_parent(mcbsp->fclk, fck_src);
7980
if (r)
8081
dev_err(mcbsp->dev, "CLKS: could not clk_set_parent() to %s\n",
8182
src);
8283

83-
pm_runtime_get_sync(mcbsp->dev);
84+
if (mcbsp->active)
85+
pm_runtime_get_sync(mcbsp->dev);
8486

8587
clk_put(fck_src);
8688

0 commit comments

Comments
 (0)