Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27974125rwd; Tue, 4 Jul 2023 10:34:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlFWnbPu6uiwrC2reodUaafAqsDZdJmAN1q+VpWCqo/tEADFN8sSXO41AnG3IhroKM7ivFH7 X-Received: by 2002:a17:90b:3706:b0:263:6297:9f73 with SMTP id mg6-20020a17090b370600b0026362979f73mr15653640pjb.1.1688492057178; Tue, 04 Jul 2023 10:34:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688492057; cv=none; d=google.com; s=arc-20160816; b=GvVfqDwOKWqtKb7CQqgyp1ggLkwtFdb5PxySzTwe0S0GGmWdVbYLIh2SZ2duhzEZjj GWFo2D15sldiUCDahFKwnEoL8EOggVqBUYrsYAbzUeZzQdDCbYBwV4CdMsKW59Er3jLt jBZThBsEXyrAzIcX3KWDMMrVkiA3iAodUGUd298Duf9K5f6JSiZzhFjX77Omh7hYP0et dxhMqwXKHYmZp374dR4TzDnBAHfW5eqvnWPk+MC9PmFe2t8HHRg7UTPcNEjhdi3n4XZk yNyDJjqy0LqX33zUVH6aW1u9Znxx6hT9xL3WNF/AvO+nOwekH68TRJDGo1BX0jzDFO6H uO0g== 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=cpqRUZuPwHDOlpqk5DOCPlUHnWQgO4m7oGgVE6h67kQ=; fh=cvpVAmu5Ckii8GSyW0nptdQd8ZRlvyTlI+wlysARr4Y=; b=zVovxyLS8/UShMm06TZm56qXs4zC+iplZ23U6zMNszuGgipsYj7Br1LOXTUNFcwrYI M4dBBC6Hru/osUYQ4yKz1XjhBm9aeF9GOAiAtQDPecZienHpCtQc7dIQY8kHJSzfojxB 9auCASvqW1HMcZb/Lh2HmzlMdxNJpXx0FM2zIEnNORp2eqf8QJiVJvfl6El11PX+xJq4 fFX6mJTxmXTmnKonKU//m7/w73x/l4Cl8vLYtTbYB8hUoL9eTb3Sk4AUkifDv2Dw0nUG 3qUZARR2plTed1P8JEZdQZQSNEoryuFCNwSoy15N+hgjX5jeUrW34zh7I79J8beHu8bI DWtg== 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 e9-20020a17090a728900b00263337c8329si13941690pjg.156.2023.07.04.10.33.59; Tue, 04 Jul 2023 10:34:17 -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 S230334AbjGDRYi (ORCPT + 99 others); Tue, 4 Jul 2023 13:24:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjGDRYh (ORCPT ); Tue, 4 Jul 2023 13:24:37 -0400 X-Greylist: delayed 636 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 04 Jul 2023 10:24:35 PDT 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 6558E10D5; Tue, 4 Jul 2023 10:24:35 -0700 (PDT) Received: from ipservice-092-217-072-126.092.217.pools.vodafone-ip.de ([92.217.72.126] 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 1qGjb8-0000oy-J7; Tue, 04 Jul 2023 19:13:54 +0200 From: Martin Kaiser To: Herbert Xu Cc: =?UTF-8?q?=C5=81ukasz=20Stelmach?= , Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH] hwrng: exynos - switch to DEFINE_SIMPLE_DEV_PM_OPS Date: Tue, 4 Jul 2023 19:10:51 +0200 Message-Id: <20230704171051.69763-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 --- compile-tested only drivers/char/hw_random/exynos-trng.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/char/hw_random/exynos-trng.c b/drivers/char/hw_random/exynos-trng.c index 9cc3d542dd0f..30207b7ac5f4 100644 --- a/drivers/char/hw_random/exynos-trng.c +++ b/drivers/char/hw_random/exynos-trng.c @@ -185,14 +185,14 @@ static int exynos_trng_remove(struct platform_device *pdev) return 0; } -static int __maybe_unused exynos_trng_suspend(struct device *dev) +static int exynos_trng_suspend(struct device *dev) { pm_runtime_put_sync(dev); return 0; } -static int __maybe_unused exynos_trng_resume(struct device *dev) +static int exynos_trng_resume(struct device *dev) { int ret; @@ -205,7 +205,7 @@ static int __maybe_unused exynos_trng_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(exynos_trng_pm_ops, exynos_trng_suspend, +static DEFINE_SIMPLE_DEV_PM_OPS(exynos_trng_pm_ops, exynos_trng_suspend, exynos_trng_resume); static const struct of_device_id exynos_trng_dt_match[] = { @@ -219,7 +219,7 @@ MODULE_DEVICE_TABLE(of, exynos_trng_dt_match); static struct platform_driver exynos_trng_driver = { .driver = { .name = "exynos-trng", - .pm = &exynos_trng_pm_ops, + .pm = pm_sleep_ptr(&exynos_trng_pm_ops), .of_match_table = exynos_trng_dt_match, }, .probe = exynos_trng_probe, -- 2.30.2