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

crypto: sun8i-ce - using pm_runtime_resume_and_get instead of pm_runtime_get_sync

Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Minghao Chi and committed by
Herbert Xu
d3bae866 ee74fdf0

+2 -4
+2 -4
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-prng.c
··· 108 108 goto err_dst; 109 109 } 110 110 111 - err = pm_runtime_get_sync(ce->dev); 112 - if (err < 0) { 113 - pm_runtime_put_noidle(ce->dev); 111 + err = pm_runtime_resume_and_get(ce->dev); 112 + if (err < 0) 114 113 goto err_pm; 115 - } 116 114 117 115 mutex_lock(&ce->rnglock); 118 116 chan = &ce->chanlist[flow];