Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: dac: stm32-dac: Use pm_runtime_resume_and_get() to replace open coding.

Found using coccicheck script under review at:
https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/

This is a prequel to taking a closer look at the runtime pm in IIO drivers
in general

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/20210509113354.660190-17-jic23@kernel.org

+1 -2
+1 -2
drivers/iio/dac/stm32-dac.c
··· 69 69 } 70 70 71 71 if (enable) { 72 - ret = pm_runtime_get_sync(dev); 72 + ret = pm_runtime_resume_and_get(dev); 73 73 if (ret < 0) { 74 - pm_runtime_put_noidle(dev); 75 74 mutex_unlock(&dac->lock); 76 75 return ret; 77 76 }