From patchwork Wed Jun 28 13:26:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 113885 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp8937447vqr; Wed, 28 Jun 2023 06:45:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5sk73zcgSj8qNzvL15USJ5vpkHFf7zQDcueYQEihLnN2l1NJhXjSvvz/Fz0PKRrf+2xwUA X-Received: by 2002:a17:907:84d:b0:978:6be4:7efa with SMTP id ww13-20020a170907084d00b009786be47efamr29163180ejb.18.1687959910608; Wed, 28 Jun 2023 06:45:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687959910; cv=none; d=google.com; s=arc-20160816; b=FKpOujLe8++e6Y6AJgRySBG0BwjFTwU64BThoweZIc+T/tIi093koAI+69TFGR3M1h Tt9hjQBqswAsezFK4ZDiO8/1xoRvR5Hif9/h4m/PbSqTYgiA+s30eqd60FFdg8gH9Wn4 oHowrNfxfENjiLH2K51aNnZAJDi1BtRulxa/dyUBNYEvxUmgcXMqNuOR1HOTufkVw7is lCp4iF2FxyYPhYQQujk7OvdsE/FXRyvile3wgwRNEYgIeTCzJ+4KUPw9tMviOcCDDMkX TPcVSSlBlvHPw8x6TDBe5hdt2Q6mwmLLwQ7bfBFhaJpJMucmWh6q0/H7gshpcwfCoept RqdQ== 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=P9uNiL2cidi2si1c6POqxlXvWxoBqEh92VoLkzXy2GI=; fh=SeKIH61Ul6egH2MHeD0asf2btnzV9h8cLk0rz+QpCbw=; b=kcUYcyHaaWK5ebDQiiwi1g/9aKKt4z/yhdu0HY/0ad8rRI7NuIJIh2Xu2Ify9MpkpN Kg4fhqoqS5ZyTBwMzbZjgl20HmM23G59w9ww2IbDJ5ItccENotvZxuwVy37bp6DTAKJk 6tHAm8swPAfT5T/VftLms7ZWVSOvOtYoiRl3Sv/vpsou6Dy1BPOi/DgaxRzg5SIszGKf khd0hmZnEo698JqLU83by/wv7MeUBTY1XhEH9LWiqZQfzZuxbKmlgNRxrVn/3Zpp852b E1ydQJX5DlRfyaAZVMWDsPIU/UDUae5QnZIT5M+aIT5DwuYD8rtWFThamm0HEme12rfD Z16A== 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 a20-20020a17090682d400b0098cee0f8cfesi5604453ejy.969.2023.06.28.06.44.46; Wed, 28 Jun 2023 06:45:10 -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 S232165AbjF1N3p (ORCPT + 99 others); Wed, 28 Jun 2023 09:29:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231571AbjF1N2h (ORCPT ); Wed, 28 Jun 2023 09:28:37 -0400 X-Greylist: delayed 109 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 28 Jun 2023 06:28: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 E5721294E; Wed, 28 Jun 2023 06:28:35 -0700 (PDT) Received: from dslb-178-004-201-159.178.004.pools.vodafone-ip.de ([178.4.201.159] 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 1qEVDl-00033Q-Gw; Wed, 28 Jun 2023 15:28:33 +0200 From: Martin Kaiser To: Helge Deller Cc: Pengutronix Kernel Team , linux-fbdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH] fbdev: imxfb: switch to DEFINE_SIMPLE_DEV_PM_OPS Date: Wed, 28 Jun 2023 15:26:52 +0200 Message-Id: <20230628132652.87202-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?1769954251539801207?= X-GMAIL-MSGID: =?utf-8?q?1769954251539801207?= 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/video/fbdev/imxfb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index 5fbcb78a9cae..04f3bf30a529 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -1066,7 +1066,7 @@ static void imxfb_remove(struct platform_device *pdev) framebuffer_release(info); } -static int __maybe_unused imxfb_suspend(struct device *dev) +static int imxfb_suspend(struct device *dev) { struct fb_info *info = dev_get_drvdata(dev); struct imxfb_info *fbi = info->par; @@ -1076,7 +1076,7 @@ static int __maybe_unused imxfb_suspend(struct device *dev) return 0; } -static int __maybe_unused imxfb_resume(struct device *dev) +static int imxfb_resume(struct device *dev) { struct fb_info *info = dev_get_drvdata(dev); struct imxfb_info *fbi = info->par; @@ -1086,13 +1086,13 @@ static int __maybe_unused imxfb_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(imxfb_pm_ops, imxfb_suspend, imxfb_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(imxfb_pm_ops, imxfb_suspend, imxfb_resume); static struct platform_driver imxfb_driver = { .driver = { .name = DRIVER_NAME, .of_match_table = imxfb_of_dev_id, - .pm = &imxfb_pm_ops, + .pm = pm_sleep_ptr(&imxfb_pm_ops), }, .probe = imxfb_probe, .remove_new = imxfb_remove,