From patchwork Tue Jul 4 17:10:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 115876 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1379147vqx; Tue, 4 Jul 2023 10:52:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4KQfM5ER1yHTte8Z0hW9954hrTO82BHE62Db6gdK/WHiJh79xFWyCMX5q2L2sH752zEUZO X-Received: by 2002:a05:6808:1a0a:b0:3a1:b6e0:e075 with SMTP id bk10-20020a0568081a0a00b003a1b6e0e075mr18308858oib.50.1688493177893; Tue, 04 Jul 2023 10:52:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688493177; cv=none; d=google.com; s=arc-20160816; b=NeB5sT2IFnes00/2fF9OJu0HNuJcOVTzenGhTMdJBFZc8T5CmZjfK3OFTADqpNXH4+ YvMtRWoCFvtx+biGloe1R4YUYaEHv7oYa4ARk9YGl/vVzvFkxrT+b4l9X/fm8KjluiHT vLsOj3JrzIWw6T42BcDNEpw6kFhMVCC2SJnas4hTgNnxVv2VvO98m9SP8YjIdg0BNLCL s83yQdg3m0p9ZVCAwr6AL9ED2H1WnlhBc0+nZ1FnMRF5t7ctc5ZpQTg+0/Kp0D7kJXqz n+zA61eCdAW3GcTKsJ46fWFf/teQxxMv7CCBq1zIHdntKArjW2UGKayVMPnBONrxB1tF jsZw== 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=BAOM7EXvueLuSoEb9PwvoQWJjbIoFHypy0DYvQDqpkWyP+K1fGBRtvhQ7Ul65WaXfq jYpI/nts2npRTm77IYd0h55lmTsq9eZSbrq0qMFOPUmWepO5pnLXtOSVpP1AXhemejWX 8V9pZF7sHe9TWQozADX0bd9AycR6k1aqgI0QrmE7nSTEzItTpFiLYt3nWWixkAF5DkMi gLTtAO7RW5r7AokDuFZG/E6UobGBQxQOAqymoMRrPqGYm0phVOH8AoZC7fqJHaLZGCBt mOW8Sw+V17KxGiMSopSHXqaEWwCH37bpJpv6AeIUsht48z2o3Vmfatpc3mTtK7FmRhCC Knew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q26-20020a63f95a000000b00546bab11218si20006814pgk.439.2023.07.04.10.52.43; Tue, 04 Jul 2023 10:52:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231514AbjGDRYi (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_Stelmach?= , 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 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770513422137731549?= X-GMAIL-MSGID: =?utf-8?q?1770513422137731549?= 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,