Skip to content

Commit 0ffc5a4

Browse files
mohsRafibroonie
authored andcommitted
ASoC: codecs: wcd937x-sdw: Fix Unbalanced pm_runtime_enable
Fix the unbalanced pm_runtime_enable! in wcd937x-sdw soundwire slave. Fixes: c99a515 ("ASoC: codecs: wcd937x-sdw: add SoundWire driver") Signed-off-by: Mohammad Rafi Shaik <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent ee3f77a commit 0ffc5a4

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

sound/soc/codecs/wcd937x-sdw.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,13 +1067,15 @@ static int wcd9370_probe(struct sdw_slave *pdev,
10671067
wcd->ch_info = &wcd937x_sdw_rx_ch_info[0];
10681068
}
10691069

1070-
pm_runtime_set_autosuspend_delay(dev, 3000);
1071-
pm_runtime_use_autosuspend(dev);
1072-
pm_runtime_mark_last_busy(dev);
1073-
pm_runtime_set_active(dev);
1074-
pm_runtime_enable(dev);
10751070

1076-
return component_add(dev, &wcd937x_sdw_component_ops);
1071+
ret = component_add(dev, &wcd937x_sdw_component_ops);
1072+
if (ret)
1073+
return ret;
1074+
1075+
/* Set suspended until aggregate device is bind */
1076+
pm_runtime_set_suspended(dev);
1077+
1078+
return 0;
10771079
}
10781080

10791081
static int wcd9370_remove(struct sdw_slave *pdev)
@@ -1082,10 +1084,6 @@ static int wcd9370_remove(struct sdw_slave *pdev)
10821084

10831085
component_del(dev, &wcd937x_sdw_component_ops);
10841086

1085-
pm_runtime_disable(dev);
1086-
pm_runtime_set_suspended(dev);
1087-
pm_runtime_dont_use_autosuspend(dev);
1088-
10891087
return 0;
10901088
}
10911089

0 commit comments

Comments
 (0)