Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp936020pxj; Fri, 21 May 2021 02:37:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqIASCJcS6Y21wqmFVLiKX4G75ABa5CTqf95CMzlIL4czxPNQDJxBkuq402M6nccnPtOH1 X-Received: by 2002:aa7:c152:: with SMTP id r18mr10134439edp.266.1621589853939; Fri, 21 May 2021 02:37:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621589853; cv=none; d=google.com; s=arc-20160816; b=dHHsQa7YMfZz0gKvVdPpLT3hXXhCqasSMF3NZIWQuFyBTHei1fNbnS4GRBy1o3cTGK EMp/f37AwRuAsf3XPWteV00HmpMTyqYADdFW4hw1/LopiyH7NRGGS/LnQ9J5y/EjCcyZ xxYopVTw/s0Qpa//5zSILmr6xUGCJJvJd1VIiHNKl0i73aKSzRZYxzjkRHqB4cWwmUMo VCMaN4kY60lqcDyYruwmTFK412Q3LtA6sQArut8t+s3nJB1i9rspv7IzGAvS/wzVotZR 4gtdgQNzdRcRZdQkDOG0zb/6ojoBFaiHztQO+s0hG3WyJAp30xQpOUTjeEMKlFBQx06e azcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=B8kx0i/9CCKR1+lPECfI1tQAE04np7QGHToQGPllxiA=; b=fO29SltpN1FUdjs3uWMh6eE5+vUO5WIguW5ZtESNpKtRZL1+Bstdqx8A2XNEHrOJJ9 LaepOxR8LJ0IsU4A5Cj5rnG3pHG24ZDB/wYio1GnZG4rvhC5nbFSdR4BScpNYUc8EQwQ 9/ODUEcH1ZdwWUvrNPZty3rrvLMEL9F1aH96ScodCetiBlRSpfAawIQVuwxrWKBq6ZBh 74vat6Ko3nSowrGY9mzHOIs8PwP0ZOlKIxxZRH/dve5hK92qLuQ6iuO3fUdOzUe8Dh3P ecc607I2rSEQUz67yZcIO4kX2kp77RI/j1ljJd9GcbW0nyuAeJ0R3/t7lHmGVXxG0zX3 IKnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hisilicon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c14si4675492edv.258.2021.05.21.02.37.10; Fri, 21 May 2021 02:37:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238962AbhEUD7h (ORCPT + 99 others); Thu, 20 May 2021 23:59:37 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:3638 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233879AbhEUD7h (ORCPT ); Thu, 20 May 2021 23:59:37 -0400 Received: from dggems702-chm.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FmXp34bqCzlfPC; Fri, 21 May 2021 11:55:55 +0800 (CST) Received: from dggeme759-chm.china.huawei.com (10.3.19.105) by dggems702-chm.china.huawei.com (10.3.19.179) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Fri, 21 May 2021 11:58:12 +0800 Received: from localhost.localdomain (10.69.192.56) by dggeme759-chm.china.huawei.com (10.3.19.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 21 May 2021 11:58:12 +0800 From: Tian Tao To: , CC: , , "Tian Tao" Subject: [PATCH] hwrng: exynos: Use pm_runtime_resume_and_get() to replace open coding Date: Fri, 21 May 2021 11:58:09 +0800 Message-ID: <1621569489-20554-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggeme759-chm.china.huawei.com (10.3.19.105) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org use 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. Signed-off-by: Tian Tao --- drivers/char/hw_random/exynos-trng.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/char/hw_random/exynos-trng.c b/drivers/char/hw_random/exynos-trng.c index 8e1fe3f..d71ef3c 100644 --- a/drivers/char/hw_random/exynos-trng.c +++ b/drivers/char/hw_random/exynos-trng.c @@ -196,10 +196,9 @@ static int __maybe_unused exynos_trng_resume(struct device *dev) { int ret; - ret = pm_runtime_get_sync(dev); - if (ret < 0) { + ret = pm_runtime_resume_and_get(dev); + if (ret) { dev_err(dev, "Could not get runtime PM.\n"); - pm_runtime_put_noidle(dev); return ret; } -- 2.7.4