Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2860454rwd; Fri, 16 Jun 2023 09:05:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7p4QCfeFf+7laXwjx7FVk8AResAQegIW8zd2DnLxlX3suaaazDTduxmHkrN4vFLLgSAHl/ X-Received: by 2002:a17:902:d489:b0:1ae:7ba2:1a7e with SMTP id c9-20020a170902d48900b001ae7ba21a7emr2589679plg.6.1686931522643; Fri, 16 Jun 2023 09:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686931522; cv=none; d=google.com; s=arc-20160816; b=M1f8AonY4YiAeKSgJxYIN6IiQbIV5mCorWsOBu5jy3ABg6lgCED6rqDA8dRAcnuIqA r28J3FKkG5omPoZGEUMLXw36ii2oymK8ablQmhHQ1JWaAbnQaUaVj308S+ep88MEcdAp JJkLoK5hUPwzeTRxO5D9DxbwXsVuynyo+RUYe76Iaq90WtKESAUmoibEE6234X1k/h6n djyq248bPYD2jMF2twDMNRrDfD4t/BMEZzZ6vMpsHroBQu3Yr6FyNURZHjO20qw9PVJ/ /xFAftibjzaxd9kqGsknG03BoTSF025pCwgft41cu2cnFvMTuFh8asR0Znt1M4NEFayq LovA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=fJ+kyQiOMdhbdFgL5CpCHjOLNhdR+nyclzG4c6DK6jU=; b=ckQ5aNWSuwk8dgsbesme4wRekrJIpfCtK4hbz9CLl/hqcQz/EDAXUmA+RxUl6fjo8O 3lgG42khCyuIilICygLAUgzetjJa052RRWXsiqC0nXtPYPzY61fKyvDeKtfUqJncmfLy BQVPrH7fwHeeC5Slt8a3wspLeW4ZCY0Z1Aa46gjobcSQC+oaj3RvsJa/zC0pqj5nSw+c WuGUvr/lM+D+Jmmf+njaNg+TTuWRbLWoU8LQoBksqpyF8sNwo3kTEnDvuk1lQYJaTuaT OCDT3f+IthAIzbCGx8y2YXOwoUUN9rOKKGcRBi7E1uLwVY50ZnyXcKOjaQVpuIyeBmkG 1+1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k8-20020a170902c40800b001b01d8f7586si243837plk.649.2023.06.16.09.04.33; Fri, 16 Jun 2023 09:05:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230124AbjFPQAy (ORCPT + 99 others); Fri, 16 Jun 2023 12:00:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230122AbjFPQAw (ORCPT ); Fri, 16 Jun 2023 12:00:52 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 745B435A5; Fri, 16 Jun 2023 09:00:49 -0700 (PDT) Received: from [213.246.160.249] (helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1qABsT-0003VH-VS; Fri, 16 Jun 2023 18:00:46 +0200 From: Martin Kaiser To: Herbert Xu Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH] hwrng: imx-rngc - switch to DEFINE_SIMPLE_DEV_PM_OPS Date: Fri, 16 Jun 2023 16:59:21 +0100 Message-Id: <20230616155921.1365031-1-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org SIMPLE_DEV_PM_OPS is deprecated, replace it with DEFINE_SIMPLE_DEV_PM_OPS and use pm_sleep_ptr for setting the driver's pm routines. We can now remove the __maybe_unused qualifier in the suspend and resume functions. Signed-off-by: Martin Kaiser --- drivers/char/hw_random/imx-rngc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/char/hw_random/imx-rngc.c b/drivers/char/hw_random/imx-rngc.c index e5a9dee615c8..bf07f17f78c8 100644 --- a/drivers/char/hw_random/imx-rngc.c +++ b/drivers/char/hw_random/imx-rngc.c @@ -298,7 +298,7 @@ static int __init imx_rngc_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused imx_rngc_suspend(struct device *dev) +static int imx_rngc_suspend(struct device *dev) { struct imx_rngc *rngc = dev_get_drvdata(dev); @@ -307,7 +307,7 @@ static int __maybe_unused imx_rngc_suspend(struct device *dev) return 0; } -static int __maybe_unused imx_rngc_resume(struct device *dev) +static int imx_rngc_resume(struct device *dev) { struct imx_rngc *rngc = dev_get_drvdata(dev); @@ -316,7 +316,7 @@ static int __maybe_unused imx_rngc_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(imx_rngc_pm_ops, imx_rngc_suspend, imx_rngc_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(imx_rngc_pm_ops, imx_rngc_suspend, imx_rngc_resume); static const struct of_device_id imx_rngc_dt_ids[] = { { .compatible = "fsl,imx25-rngb" }, @@ -327,7 +327,7 @@ MODULE_DEVICE_TABLE(of, imx_rngc_dt_ids); static struct platform_driver imx_rngc_driver = { .driver = { .name = KBUILD_MODNAME, - .pm = &imx_rngc_pm_ops, + .pm = pm_sleep_ptr(&imx_rngc_pm_ops), .of_match_table = imx_rngc_dt_ids, }, }; -- 2.30.2