Message ID | 20230418071605.2971866-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2647936vqo; Tue, 18 Apr 2023 00:30:59 -0700 (PDT) X-Google-Smtp-Source: AKy350bPPhCiHnWs1RtA7Y6OcmxHssC6NGsS+5eq6j7r+kpX91KVhPZpqOz7WfGBO5sY1oRNaXqs X-Received: by 2002:a05:6a20:8f15:b0:ec:72a0:6d6e with SMTP id b21-20020a056a208f1500b000ec72a06d6emr20087365pzk.61.1681803059470; Tue, 18 Apr 2023 00:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681803059; cv=none; d=google.com; s=arc-20160816; b=FuwK41MXibhdwEQrlKupFA45IVeKPacevuL6B+8G4uig9k7DE6y7BrUZS2xav/kFlw 3xauzMxZ+vxfHg8isdexdV0RtxM94CxJs0mAM3jJ+NgybSIpLIxuVNGaQLa52sK8Kjdi 3YvsOl3U9WZhTWsVqVoNSzrbZHUVE9nCpDTg7GBRO1CIR4n8+w827GUh1QrnRMkMNSsi MB4Qk49e7N5hDhu8RrDu+oNGnZVu8mEGQsjbRrGZMuyHI59eqGwo4NiWM/DXv5P5qnsr iIKiMsZnGCGCWGaqcw/0nt1hQjol9/H2lF5DrECMIa/WsbhbW+eIFCmlE71/RbEmvOB3 ngag== 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:dkim-signature; bh=FliG5RRYB1XT5AbWq6WKBRC9Sm9mOhGR+i6mhbLeNhE=; b=oylLi/eMOdr/F0vR3D67hSMqYogkcIWAg/R6iV1epQy0Zq2UT77ZnOZiml1ps9DZBg gtMaeaah3NDocDaRB2u+t8Sa57Ho7uprv5pVFSrHMyPd+5F6l67SVH+pxDoaHrNbgnVf 0omQX8Dk4VsG0e0Yu+ek4RJ25x1kr1dUVI9XaX9KZ9YQevThc2LpjSoi2tuW3OFJoyOm SYh/w8doGa93bBjb7fm2Agck3dtv4hMif5ZsSaOUixKfXkXyvbh5QDPF80Pd37A2X7Mz 7Mqe18KspZtke8oy2iWqIIdRAlKIBDGVy7bZDdUQjU0OKX74m0VF95KOwVx7dTGuoWpZ lguw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mm7+Es+N; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q125-20020a632a83000000b0051f15bd7215si1285068pgq.342.2023.04.18.00.30.46; Tue, 18 Apr 2023 00:30:59 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mm7+Es+N; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231143AbjDRHQP (ORCPT <rfc822;leviz.kernel.dev@gmail.com> + 99 others); Tue, 18 Apr 2023 03:16:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229631AbjDRHQO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 18 Apr 2023 03:16:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6309D1BF6; Tue, 18 Apr 2023 00:16:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F0D23622ED; Tue, 18 Apr 2023 07:16:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09166C4339C; Tue, 18 Apr 2023 07:16:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681802172; bh=07NV2Gmox+YRD93ereeLrOro5v93hkdsxev1VKaen7Q=; h=From:To:Cc:Subject:Date:From; b=mm7+Es+NlCcXGiXXyoWT9RuaKMVF9rjk5PcIzc6t8qVNwF4ujzaYdkZwHaFYcIEnG CeVZRwb/It9DxKRSj2mCKlxrB2CrqEiZkUJm6Jowri2QjedPrLhVasLINm4rPvEL2E 9vO9yc5SsgHBN5+GYjr7l/+6c0R5/KQ8H7/rDAShmpnu4IQZS8GBX1FsLLUstWGVV0 xRBW0DhDEurQc9f7qk/hXVK4zJnByE4LS4LoAvU+wEfY+w7CxZ3ZWsqKdT4MPfeyed ogGHuzI5n4IBYpPGcxxSoNChyFlxkdrOtk7uTS4S5XliIKOWStVLgC6+hWwRj14slS vvYC6xO30yZSg== From: Arnd Bergmann <arnd@kernel.org> To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Dong Aisheng <aisheng.dong@nxp.com>, Guoniu Zhou <guoniu.zhou@nxp.com>, Stefan Riedmueller <s.riedmueller@phytec.de> Cc: Arnd Bergmann <arnd@arndb.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, Christian Hemp <c.hemp@phytec.de>, Jacopo Mondi <jacopo@jmondi.org>, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: nxp: ignore unused suspend operations Date: Tue, 18 Apr 2023 09:15:51 +0200 Message-Id: <20230418071605.2971866-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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: <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?1763498324862259134?= X-GMAIL-MSGID: =?utf-8?q?1763498324862259134?= |
Series |
media: nxp: ignore unused suspend operations
|
|
Commit Message
Arnd Bergmann
April 18, 2023, 7:15 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de> gcc warns about some functions being unused when CONFIG_PM is disabled: drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:328:12: error: 'mxc_isi_pm_resume' defined but not used [-Werror=unused-function] 328 | static int mxc_isi_pm_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~ drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:314:12: error: 'mxc_isi_pm_suspend' defined but not used [-Werror=unused-function] 314 | static int mxc_isi_pm_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~ Use the modern SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() helpers in place of the old SET_SYSTEM_SLEEP_PM_OPS()/SET_RUNTIME_PM_OPS() ones, and add a pm_ptr() check to ensure they get dropped by the compiler. Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Comments
Hi Arnd, Thank you for the patch. On Tue, Apr 18, 2023 at 09:15:51AM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > gcc warns about some functions being unused when CONFIG_PM is > disabled: > > drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:328:12: error: 'mxc_isi_pm_resume' defined but not used [-Werror=unused-function] > 328 | static int mxc_isi_pm_resume(struct device *dev) > | ^~~~~~~~~~~~~~~~~ > drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:314:12: error: 'mxc_isi_pm_suspend' defined but not used [-Werror=unused-function] > 314 | static int mxc_isi_pm_suspend(struct device *dev) > | ^~~~~~~~~~~~~~~~~~ > > Use the modern SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() helpers in place > of the old SET_SYSTEM_SLEEP_PM_OPS()/SET_RUNTIME_PM_OPS() ones, and add > a pm_ptr() check to ensure they get dropped by the compiler. I've also sent a patch for this one :-) See https://lore.kernel.org/linux-media/20230417053949.7395-2-laurent.pinchart@ideasonboard.com/T/#u. Your patch looks better, so Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c > index 238521622b75..253e77189b69 100644 > --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c > +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c > @@ -378,8 +378,8 @@ static int mxc_isi_runtime_resume(struct device *dev) > } > > static const struct dev_pm_ops mxc_isi_pm_ops = { > - SET_SYSTEM_SLEEP_PM_OPS(mxc_isi_pm_suspend, mxc_isi_pm_resume) > - SET_RUNTIME_PM_OPS(mxc_isi_runtime_suspend, mxc_isi_runtime_resume, NULL) > + SYSTEM_SLEEP_PM_OPS(mxc_isi_pm_suspend, mxc_isi_pm_resume) > + RUNTIME_PM_OPS(mxc_isi_runtime_suspend, mxc_isi_runtime_resume, NULL) > }; > > /* ----------------------------------------------------------------------------- > @@ -528,7 +528,7 @@ static struct platform_driver mxc_isi_driver = { > .driver = { > .of_match_table = mxc_isi_of_match, > .name = MXC_ISI_DRIVER_NAME, > - .pm = &mxc_isi_pm_ops, > + .pm = pm_ptr(&mxc_isi_pm_ops), > } > }; > module_platform_driver(mxc_isi_driver);
Hi Arnd, On 18/04/2023 09:15, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > gcc warns about some functions being unused when CONFIG_PM is > disabled: ??? The Kconfig has a: depends on HAS_DMA && PM So how can this be compiled with CONFIG_PM not set? Am I missing something? Hans > > drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:328:12: error: 'mxc_isi_pm_resume' defined but not used [-Werror=unused-function] > 328 | static int mxc_isi_pm_resume(struct device *dev) > | ^~~~~~~~~~~~~~~~~ > drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:314:12: error: 'mxc_isi_pm_suspend' defined but not used [-Werror=unused-function] > 314 | static int mxc_isi_pm_suspend(struct device *dev) > | ^~~~~~~~~~~~~~~~~~ > > Use the modern SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() helpers in place > of the old SET_SYSTEM_SLEEP_PM_OPS()/SET_RUNTIME_PM_OPS() ones, and add > a pm_ptr() check to ensure they get dropped by the compiler. > > Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c > index 238521622b75..253e77189b69 100644 > --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c > +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c > @@ -378,8 +378,8 @@ static int mxc_isi_runtime_resume(struct device *dev) > } > > static const struct dev_pm_ops mxc_isi_pm_ops = { > - SET_SYSTEM_SLEEP_PM_OPS(mxc_isi_pm_suspend, mxc_isi_pm_resume) > - SET_RUNTIME_PM_OPS(mxc_isi_runtime_suspend, mxc_isi_runtime_resume, NULL) > + SYSTEM_SLEEP_PM_OPS(mxc_isi_pm_suspend, mxc_isi_pm_resume) > + RUNTIME_PM_OPS(mxc_isi_runtime_suspend, mxc_isi_runtime_resume, NULL) > }; > > /* ----------------------------------------------------------------------------- > @@ -528,7 +528,7 @@ static struct platform_driver mxc_isi_driver = { > .driver = { > .of_match_table = mxc_isi_of_match, > .name = MXC_ISI_DRIVER_NAME, > - .pm = &mxc_isi_pm_ops, > + .pm = pm_ptr(&mxc_isi_pm_ops), > } > }; > module_platform_driver(mxc_isi_driver);
On Tue, Apr 18, 2023, at 10:04, Hans Verkuil wrote: > On 18/04/2023 09:15, Arnd Bergmann wrote: >> From: Arnd Bergmann <arnd@arndb.de> >> >> gcc warns about some functions being unused when CONFIG_PM is >> disabled: > > ??? > > The Kconfig has a: > > depends on HAS_DMA && PM > > So how can this be compiled with CONFIG_PM not set? > > Am I missing something? My mistake, the warning only shows up when CONFIG_PM_SLEEP is disabled. Arnd
On Tue, Apr 18, 2023 at 10:04:13AM +0200, Hans Verkuil wrote: > Hi Arnd, > > On 18/04/2023 09:15, Arnd Bergmann wrote: > > From: Arnd Bergmann <arnd@arndb.de> > > > > gcc warns about some functions being unused when CONFIG_PM is > > disabled: > > ??? > > The Kconfig has a: > > depends on HAS_DMA && PM > > So how can this be compiled with CONFIG_PM not set? > > Am I missing something? The warning appears when CONFIG_PM_SLEEP is disabled. The pm_ptr() change is thus not useful, but the switch to SYSTEM_SLEEP_PM_OPS() and RUNTIME_PM_OPS() make a difference. > > drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:328:12: error: 'mxc_isi_pm_resume' defined but not used [-Werror=unused-function] > > 328 | static int mxc_isi_pm_resume(struct device *dev) > > | ^~~~~~~~~~~~~~~~~ > > drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:314:12: error: 'mxc_isi_pm_suspend' defined but not used [-Werror=unused-function] > > 314 | static int mxc_isi_pm_suspend(struct device *dev) > > | ^~~~~~~~~~~~~~~~~~ > > > > Use the modern SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() helpers in place > > of the old SET_SYSTEM_SLEEP_PM_OPS()/SET_RUNTIME_PM_OPS() ones, and add > > a pm_ptr() check to ensure they get dropped by the compiler. > > > > Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver") > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > --- > > drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c > > index 238521622b75..253e77189b69 100644 > > --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c > > +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c > > @@ -378,8 +378,8 @@ static int mxc_isi_runtime_resume(struct device *dev) > > } > > > > static const struct dev_pm_ops mxc_isi_pm_ops = { > > - SET_SYSTEM_SLEEP_PM_OPS(mxc_isi_pm_suspend, mxc_isi_pm_resume) > > - SET_RUNTIME_PM_OPS(mxc_isi_runtime_suspend, mxc_isi_runtime_resume, NULL) > > + SYSTEM_SLEEP_PM_OPS(mxc_isi_pm_suspend, mxc_isi_pm_resume) > > + RUNTIME_PM_OPS(mxc_isi_runtime_suspend, mxc_isi_runtime_resume, NULL) > > }; > > > > /* ----------------------------------------------------------------------------- > > @@ -528,7 +528,7 @@ static struct platform_driver mxc_isi_driver = { > > .driver = { > > .of_match_table = mxc_isi_of_match, > > .name = MXC_ISI_DRIVER_NAME, > > - .pm = &mxc_isi_pm_ops, > > + .pm = pm_ptr(&mxc_isi_pm_ops), > > } > > }; > > module_platform_driver(mxc_isi_driver);
Hi Arnd, On 18/04/2023 10:19, Laurent Pinchart wrote: > On Tue, Apr 18, 2023 at 10:04:13AM +0200, Hans Verkuil wrote: >> Hi Arnd, >> >> On 18/04/2023 09:15, Arnd Bergmann wrote: >>> From: Arnd Bergmann <arnd@arndb.de> >>> >>> gcc warns about some functions being unused when CONFIG_PM is >>> disabled: >> >> ??? >> >> The Kconfig has a: >> >> depends on HAS_DMA && PM >> >> So how can this be compiled with CONFIG_PM not set? >> >> Am I missing something? > > The warning appears when CONFIG_PM_SLEEP is disabled. The pm_ptr() > change is thus not useful, but the switch to SYSTEM_SLEEP_PM_OPS() and > RUNTIME_PM_OPS() make a difference. Can you post a v3? Thank you! Hans > >>> drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:328:12: error: 'mxc_isi_pm_resume' defined but not used [-Werror=unused-function] >>> 328 | static int mxc_isi_pm_resume(struct device *dev) >>> | ^~~~~~~~~~~~~~~~~ >>> drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:314:12: error: 'mxc_isi_pm_suspend' defined but not used [-Werror=unused-function] >>> 314 | static int mxc_isi_pm_suspend(struct device *dev) >>> | ^~~~~~~~~~~~~~~~~~ >>> >>> Use the modern SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() helpers in place >>> of the old SET_SYSTEM_SLEEP_PM_OPS()/SET_RUNTIME_PM_OPS() ones, and add >>> a pm_ptr() check to ensure they get dropped by the compiler. >>> >>> Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver") >>> Signed-off-by: Arnd Bergmann <arnd@arndb.de> >>> --- >>> drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c | 6 +++--- >>> 1 file changed, 3 insertions(+), 3 deletions(-) >>> >>> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c >>> index 238521622b75..253e77189b69 100644 >>> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c >>> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c >>> @@ -378,8 +378,8 @@ static int mxc_isi_runtime_resume(struct device *dev) >>> } >>> >>> static const struct dev_pm_ops mxc_isi_pm_ops = { >>> - SET_SYSTEM_SLEEP_PM_OPS(mxc_isi_pm_suspend, mxc_isi_pm_resume) >>> - SET_RUNTIME_PM_OPS(mxc_isi_runtime_suspend, mxc_isi_runtime_resume, NULL) >>> + SYSTEM_SLEEP_PM_OPS(mxc_isi_pm_suspend, mxc_isi_pm_resume) >>> + RUNTIME_PM_OPS(mxc_isi_runtime_suspend, mxc_isi_runtime_resume, NULL) >>> }; >>> >>> /* ----------------------------------------------------------------------------- >>> @@ -528,7 +528,7 @@ static struct platform_driver mxc_isi_driver = { >>> .driver = { >>> .of_match_table = mxc_isi_of_match, >>> .name = MXC_ISI_DRIVER_NAME, >>> - .pm = &mxc_isi_pm_ops, >>> + .pm = pm_ptr(&mxc_isi_pm_ops), >>> } >>> }; >>> module_platform_driver(mxc_isi_driver); >
On Tue, Apr 18, 2023, at 10:19, Laurent Pinchart wrote: > On Tue, Apr 18, 2023 at 10:04:13AM +0200, Hans Verkuil wrote: >> Hi Arnd, >> >> On 18/04/2023 09:15, Arnd Bergmann wrote: >> > From: Arnd Bergmann <arnd@arndb.de> >> > >> > gcc warns about some functions being unused when CONFIG_PM is >> > disabled: >> >> ??? >> >> The Kconfig has a: >> >> depends on HAS_DMA && PM >> >> So how can this be compiled with CONFIG_PM not set? >> >> Am I missing something? > > The warning appears when CONFIG_PM_SLEEP is disabled. The pm_ptr() > change is thus not useful, but the switch to SYSTEM_SLEEP_PM_OPS() and > RUNTIME_PM_OPS() make a difference. I sent a v3 now. I ended up leaving the pm_ptr() in here, based on the recommended usage of the new macros. Arnd
diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c index 238521622b75..253e77189b69 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c @@ -378,8 +378,8 @@ static int mxc_isi_runtime_resume(struct device *dev) } static const struct dev_pm_ops mxc_isi_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(mxc_isi_pm_suspend, mxc_isi_pm_resume) - SET_RUNTIME_PM_OPS(mxc_isi_runtime_suspend, mxc_isi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(mxc_isi_pm_suspend, mxc_isi_pm_resume) + RUNTIME_PM_OPS(mxc_isi_runtime_suspend, mxc_isi_runtime_resume, NULL) }; /* ----------------------------------------------------------------------------- @@ -528,7 +528,7 @@ static struct platform_driver mxc_isi_driver = { .driver = { .of_match_table = mxc_isi_of_match, .name = MXC_ISI_DRIVER_NAME, - .pm = &mxc_isi_pm_ops, + .pm = pm_ptr(&mxc_isi_pm_ops), } }; module_platform_driver(mxc_isi_driver);