[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240105172218.42457-4-pstanner@redhat.com>
Date: Fri, 5 Jan 2024 18:22:19 +0100
From: Philipp Stanner <pstanner@...hat.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Laurentiu Palcu <laurentiu.palcu@....nxp.com>,
Lucas Stach <l.stach@...gutronix.de>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
Mark Brown <broonie@...nel.org>,
Takashi Iwai <tiwai@...e.de>,
David Gow <davidgow@...gle.com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org,
Philipp Stanner <pstanner@...hat.com>
Subject: [PATCH 2/2] drm/dcss: request memory region
The driver's memory regions are currently just ioremap()ed, but not
reserved through a request. That's not a bug, but having the request is
a little more robust.
Implement the region-request through the corresponding managed
devres-function.
Signed-off-by: Philipp Stanner <pstanner@...hat.com>
---
drivers/gpu/drm/imx/dcss/dcss-dev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/imx/dcss/dcss-dev.c b/drivers/gpu/drm/imx/dcss/dcss-dev.c
index 4f3af0dfb344..efd3a998652d 100644
--- a/drivers/gpu/drm/imx/dcss/dcss-dev.c
+++ b/drivers/gpu/drm/imx/dcss/dcss-dev.c
@@ -177,10 +177,10 @@ struct dcss_dev *dcss_dev_create(struct device *dev, bool hdmi_output)
return ERR_PTR(-ENODEV);
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(dev, "cannot get memory resource\n");
- return ERR_PTR(-EINVAL);
+ res = devm_platform_get_resource(pdev, IORESOURCE_MEM, 0, "dcss");
+ if (IS_ERR(res)) {
+ dev_err(dev, "cannot get / request memory resource\n");
+ return res;
}
dcss = kzalloc(sizeof(*dcss), GFP_KERNEL);
--
2.43.0
Powered by blists - more mailing lists