From patchwork Fri Jun 16 15:59:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 109235 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1457313vqr; Fri, 16 Jun 2023 09:14:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6BI1+1sxLo2qcAA1OtYldSX8RyU2PDZdFA7jWoiNkhsdr7C7WQZ1IlwmloPfZ0MOp8hwcm X-Received: by 2002:a17:902:ee41:b0:1b3:de1d:1ce1 with SMTP id 1-20020a170902ee4100b001b3de1d1ce1mr2001971plo.61.1686932090555; Fri, 16 Jun 2023 09:14:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686932090; cv=none; d=google.com; s=arc-20160816; b=vbx8+L1HkyCod2O8jgynEnHLTfeizBDeBwjJtXQc/7ST7l6+JhTacNoK3bqqqaZxX5 qa4LdBw5e1cLEHywlmN41WopJI4sP1jHMVFfhXle95P/+Kuvcr3oo3nfjzq3LR8hQiMH pnyfaMQZZ3gdha+Lve42roEVrUvdc4/xMQELcuh8KKJLjP15au6L2FCOsrjFZs5lLOhk fjxVu4QjTRzA4uoYhXlTZTzAGbiz9qPiskHvBHUHiCJh2+nXZ2MEri+4M8X4DRvADuqi bZNZ39+kevXcIaXMr8I/IPDWKoPAknvpRw3hjdxH70CM3iXiS6QURu0T5tngNfLnXn2Q uPGg== 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=uD49o92n4CZUdZkLxR09DNybPiqpyF2Sy2aV6Jk4wLeIQbJY37vLC4uQOJYgJHAH9A KE2j7lr3GLjkJGZFcB8lKbtP22FH6GqXP4LbKOUBhcfNdripOfsmhFBSnDDKnAn3QbaV W1kYI1+lio5kV34kphXlleRwYyyTrGeT2w2WX8TeirH+XX8wQ6GjKsOAneiVDZGIQLHu mNN+ToiW1M9oSpHefPvS2/kiyUU+rO07rzEETig9Kg3NMfuDPg5DIA1FHnm/3sbyQ38b M9/1E74ZAPE1nRedH2bq9dXpdBNXxS0q/0cVNI5+R+xzA8/DkFrD+lEH83bx7Z4aKtJI WRTg== 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 p2-20020a170902e74200b001b3e3a19377si8950461plf.127.2023.06.16.09.14.30; Fri, 16 Jun 2023 09:14:50 -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 S1344487AbjFPQAz (ORCPT + 99 others); Fri, 16 Jun 2023 12:00:55 -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 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?1768876503684535605?= X-GMAIL-MSGID: =?utf-8?q?1768876503684535605?= 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, }, };