From: Pierre-Louis Bossart Date: Thu, 16 Jun 2022 22:04:27 +0000 (-0500) Subject: ASoC: ti: davinci-mcasp: use pm_runtime_resume_and_get() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=cecc81d6a5deb094bdbc6a1d7f2c014ba9b71cf8;p=linux.git ASoC: ti: davinci-mcasp: use pm_runtime_resume_and_get() The use of pm_runtime_get_sync() is buggy with no use of put_noidle on error. Use pm_runtime_resume_and_get() instead. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Acked-by: Peter Ujfalusi Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220616220427.136036-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c index e2aab4729f3ab..0201000b619f6 100644 --- a/sound/soc/ti/davinci-mcasp.c +++ b/sound/soc/ti/davinci-mcasp.c @@ -2111,8 +2111,7 @@ static int davinci_mcasp_gpio_request(struct gpio_chip *chip, unsigned offset) } /* Do not change the PIN yet */ - - return pm_runtime_get_sync(mcasp->dev); + return pm_runtime_resume_and_get(mcasp->dev); } static void davinci_mcasp_gpio_free(struct gpio_chip *chip, unsigned offset)