Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3369278pxj; Mon, 24 May 2021 05:16:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwG1Vda1qiYSqowomp1Va/S0BAla3EnniwKDjxZAOcvcJbNM2QVdn7k8WUEDYe4EvOOMGj X-Received: by 2002:a05:6e02:1c82:: with SMTP id w2mr18366340ill.15.1621858606908; Mon, 24 May 2021 05:16:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621858606; cv=none; d=google.com; s=arc-20160816; b=kRvOhnSG+z/0myG5AEUNkB1aEVXfGWuEiwhdP11GG4ZDs/bq5TYYRXUsPNZipVWOd8 MTGgr2+uPe6lCt6k1wmqa4UZuwZkH1XZCT1SVgqVum2sjeD0qJav1V/7dSpbt72a6rF3 Bcc9K2Wy9YiD6guPXpt6luVw73738xXLmnZYTcdxyTyq8CnVR57FiDg8xE1ialWDmAh4 /u2MzHjv+hjS1tcpHK6yRXbg8KlV0Rz83WkAeZK600wIdFOzNLL7WJNM0w6JLrkVzCnc EMAeNw9mCtBMsmxxcKQIKsWuG2qr9dvSF/0RwX9wbc9bivuBJvvWYhyo/pKnpasxnuVt 2j9A== 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=zZElIwmcSgBE5ka3+miHu8eOKcfizz/6OWPfoyAQTMU=; b=aH05UTr0WW46yRLS60lcpga5BGRq+u/dJ+tjK7YbCtgWXNij+sfd1WYYESJi7AH21E KWS7W4fgMZVuHlRTQi+VpwN4OIqWE/SHO47SUqdUMclmM8C2hBD8WAIiu2y+aZFY1CQy QXuGtJzVGd5VTboGYrokdMcbE+yGfW7JCRpfsRVhC0cEItsRgmZCh//gmFRze1cn6xQ0 +fhtCX1QZ6WTq1q8BdD9am98mXkH9bckn/VrzAg5gkiq7Azu7t/dbUhVVt7dXpeevYTu 7YaHizxgelRaUgtX9R7Z/A6b2uGbB6hDRkGps5fEI1mOY4rxtKiG60Gh+i2mqiXAzRLc 5pvg== 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 s9si14861912jat.121.2021.05.24.05.16.27; Mon, 24 May 2021 05:16:46 -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 S232110AbhEXMRm (ORCPT + 99 others); Mon, 24 May 2021 08:17:42 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:3928 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231969AbhEXMRl (ORCPT ); Mon, 24 May 2021 08:17:41 -0400 Received: from dggems703-chm.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4Fpbhc3SLGzBvpQ; Mon, 24 May 2021 20:13:20 +0800 (CST) Received: from dggeme759-chm.china.huawei.com (10.3.19.105) by dggems703-chm.china.huawei.com (10.3.19.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Mon, 24 May 2021 20:16:11 +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; Mon, 24 May 2021 20:16:10 +0800 From: Tian Tao To: , CC: , Tian Tao Subject: [PATCH] hwrng: omap - Use pm_runtime_resume_and_get() to replace open coding Date: Mon, 24 May 2021 20:16:05 +0800 Message-ID: <1621858565-36172-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: dggems706-chm.china.huawei.com (10.3.19.183) 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/omap-rng.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index cede9f1..5794635 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random/omap-rng.c @@ -454,10 +454,9 @@ static int omap_rng_probe(struct platform_device *pdev) } pm_runtime_enable(&pdev->dev); - ret = pm_runtime_get_sync(&pdev->dev); + ret = pm_runtime_resume_and_get(&pdev->dev); if (ret < 0) { dev_err(&pdev->dev, "Failed to runtime_get device: %d\n", ret); - pm_runtime_put_noidle(&pdev->dev); goto err_ioremap; } -- 2.7.4