From patchwork Tue Jul 27 10:23:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 488311 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2199AC432BE for ; Tue, 27 Jul 2021 10:24:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 02F3561989 for ; Tue, 27 Jul 2021 10:24:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236249AbhG0KYI (ORCPT ); Tue, 27 Jul 2021 06:24:08 -0400 Received: from muru.com ([72.249.23.125]:55824 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236262AbhG0KXz (ORCPT ); Tue, 27 Jul 2021 06:23:55 -0400 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 7F045812F; Tue, 27 Jul 2021 10:24:11 +0000 (UTC) From: Tony Lindgren To: "David S . Miller" , Herbert Xu , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Cc: linux-crypto@vger.kernel.org, Lokesh Vutla , Tero Kristo Subject: [PATCH 3/6] crypto: omap-sham - add missing pm_runtime_dontuse_autosuspend() Date: Tue, 27 Jul 2021 13:23:36 +0300 Message-Id: <20210727102339.49141-3-tony@atomide.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210727102339.49141-1-tony@atomide.com> References: <20210727102339.49141-1-tony@atomide.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org We should pair the usage of pm_runtime_use_autosuspend() with pm_runtime_dont_use_autosuspend(). Cc: Lokesh Vutla Cc: Tero Kristo Signed-off-by: Tony Lindgren --- drivers/crypto/omap-sham.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -2198,6 +2198,7 @@ static int omap_sham_probe(struct platform_device *pdev) list_del(&dd->list); spin_unlock(&sham.lock); err_pm: + pm_runtime_dont_use_autosuspend(dev); pm_runtime_disable(dev); if (!dd->polling_mode) dma_release_channel(dd->dma_lch); @@ -2225,6 +2226,7 @@ static int omap_sham_remove(struct platform_device *pdev) dd->pdata->algs_info[i].registered--; } tasklet_kill(&dd->done_task); + pm_runtime_dont_use_autosuspend(&pdev->dev); pm_runtime_disable(&pdev->dev); if (!dd->polling_mode)