Message ID | 20221107175106.360578-8-paul@crapouillou.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2200947wru; Mon, 7 Nov 2022 09:54:45 -0800 (PST) X-Google-Smtp-Source: AMsMyM5A2YuoA/T79qNWdLbwVVewueCNYoQqd4jHtwljjnGZCU9Fz28j1Q3FY1h/jZCNq7UeaEpp X-Received: by 2002:a05:6a00:1f06:b0:56c:ee8a:29f7 with SMTP id be6-20020a056a001f0600b0056cee8a29f7mr51921509pfb.44.1667843685070; Mon, 07 Nov 2022 09:54:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667843685; cv=none; d=google.com; s=arc-20160816; b=vO6Dq9OCm5qmER+dSEXbgMAFjX/oeXiR7mEZLDoFylg/kqD2iwxgZUBUzVvMX8eL1h yK40ufJ/TXAryQYQ0e8YdD8POnKSfhBYNnJR6liK1ciekkCdlrj4WYbTOmYZ8m2DDnIC HHjHDA3xOpmMTJP1aOm+I72iJeUOQ5TpnbwmnfOiPUSgpVNHp+BNJLC/nA+dE3TcqFOD tk50ERI3aDT0QE/PgUQ2pleU0uYA2PePFBUDpt0EkLsqpEZTuQLzU1UBeAE3N1bzu6Vq GxMfzsOxPHsGuaGNeOX8Ny77q99fzMPe651oBybho1DRUkardpz8o98ysYNPAKrmp+oC W2Qg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LJrez2HgHsu1m6pMalZRo52s3LhdGvl2oAnXej4fda4=; b=XE1IBCvziolzngnqq5WT7s5grzUOKPbpdVjL8PPCQE5hVWmdyrGa9QptDWL9qmrQ8t yys6zQslVJ/QaaBZYAD3fA98GkLX6jiQNQ0RzLsqrQeJMJae2rPZLe39xdJyKZdISru9 /P97Xho9MIzAWD6Nh6S4ZWc0kKbHyZ9NqEjblNRsmDlCgaNIp8o4BNppmyf3PYkloqFg xKKn75uXUTkmqsipAcm/8oO75AQHfqS8Wl+yNRTv5YkzeFtaTCk5MLN2TWvx73+kFBq8 ospP1TpMTbE5jj1r783inWRhoMG7/98ChAsxC1A59PjDM7uiNaIJugiNoHCrTXt38ibk Z8hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=J47Eo1Wi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y3-20020a655b03000000b0043cb43f584fsi12181185pgq.482.2022.11.07.09.54.31; Mon, 07 Nov 2022 09:54:45 -0800 (PST) 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; dkim=pass header.i=@crapouillou.net header.s=mail header.b=J47Eo1Wi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232372AbiKGRwi (ORCPT <rfc822;hjfbswb@gmail.com> + 99 others); Mon, 7 Nov 2022 12:52:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232466AbiKGRwW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 7 Nov 2022 12:52:22 -0500 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B320248F0 for <linux-kernel@vger.kernel.org>; Mon, 7 Nov 2022 09:52:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1667843479; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LJrez2HgHsu1m6pMalZRo52s3LhdGvl2oAnXej4fda4=; b=J47Eo1Wi/Q1t2923o0dP/gN2S+4ay/NzH0WdM4wgKrdp//vEZWWBiVv/04q+NV1hi5lA2t q4MIkxqOCBvLLlbsN9LwgZuuRB5N5sguM2NvlT5uwsPYw5fE++JGmwzQheJviKXT4RfWLB 3Zaw65BzTAhSwwwqUcqokD/Du3g0ZCk= From: Paul Cercueil <paul@crapouillou.net> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch> Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Paul Cercueil <paul@crapouillou.net>, Marek Vasut <marex@denx.de>, Stefan Agner <stefan@agner.ch>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH 07/26] drm: msxfb: Use the dev_pm_ops provided by modeset helper Date: Mon, 7 Nov 2022 17:50:47 +0000 Message-Id: <20221107175106.360578-8-paul@crapouillou.net> In-Reply-To: <20221107175106.360578-1-paul@crapouillou.net> References: <20221107175106.360578-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam: Yes X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748860860076596041?= X-GMAIL-MSGID: =?utf-8?q?1748860860076596041?= |
Series |
drm: Get rid of #ifdef CONFIG_PM* guards
|
|
Commit Message
Paul Cercueil
Nov. 7, 2022, 5:50 p.m. UTC
Use the drm_mode_config_pm_ops structure exported by
drm_modeset_helper.c, which provides the exact same PM callbacks.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Agner <stefan@agner.ch>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: linux-arm-kernel@lists.infradead.org
---
drivers/gpu/drm/mxsfb/mxsfb_drv.c | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index b29b332ed381..917ba3bfadcf 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -398,26 +398,6 @@ static void mxsfb_shutdown(struct platform_device *pdev) drm_atomic_helper_shutdown(drm); } -#ifdef CONFIG_PM_SLEEP -static int mxsfb_suspend(struct device *dev) -{ - struct drm_device *drm = dev_get_drvdata(dev); - - return drm_mode_config_helper_suspend(drm); -} - -static int mxsfb_resume(struct device *dev) -{ - struct drm_device *drm = dev_get_drvdata(dev); - - return drm_mode_config_helper_resume(drm); -} -#endif - -static const struct dev_pm_ops mxsfb_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(mxsfb_suspend, mxsfb_resume) -}; - static struct platform_driver mxsfb_platform_driver = { .probe = mxsfb_probe, .remove = mxsfb_remove, @@ -425,7 +405,7 @@ static struct platform_driver mxsfb_platform_driver = { .driver = { .name = "mxsfb", .of_match_table = mxsfb_dt_ids, - .pm = &mxsfb_pm_ops, + .pm = pm_sleep_ptr(&drm_mode_config_pm_ops), }, };