public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: javierm@redhat.com, lanzano.alex@gmail.com,
	kamlesh.gurudasani@gmail.com, david@lechnology.com,
	architanant5@gmail.com, wens@kernel.org, mripard@kernel.org,
	maarten.lankhorst@linux.intel.com, simona@ffwll.ch,
	airlied@gmail.com
Cc: dri-devel@lists.freedesktop.org, Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH v2 12/16] drm/st7735r: Rename struct st7735r_priv to struct st7735r_device
Date: Wed, 11 Mar 2026 11:10:35 +0100	[thread overview]
Message-ID: <20260311101438.365997-13-tzimmermann@suse.de> (raw)
In-Reply-To: <20260311101438.365997-1-tzimmermann@suse.de>

Rename the driver's device struct according to DRM conventions. Also
add a helper to upcast from struct drm_device. No functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/sitronix/st7735r.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/sitronix/st7735r.c b/drivers/gpu/drm/sitronix/st7735r.c
index 1a34c7ba460b..9dd915765a6b 100644
--- a/drivers/gpu/drm/sitronix/st7735r.c
+++ b/drivers/gpu/drm/sitronix/st7735r.c
@@ -52,18 +52,22 @@ struct st7735r_cfg {
 	unsigned int rgb:1;		/* RGB (vs. BGR) */
 };
 
-struct st7735r_priv {
+struct st7735r_device {
 	struct mipi_dbi_dev dbidev;	/* Must be first for .release() */
 	const struct st7735r_cfg *cfg;
 };
 
+static struct st7735r_device *to_st7735r_device(struct drm_device *drm)
+{
+	return container_of(drm_to_mipi_dbi_dev(drm), struct st7735r_device, dbidev);
+}
+
 static void st7735r_pipe_enable(struct drm_simple_display_pipe *pipe,
 				struct drm_crtc_state *crtc_state,
 				struct drm_plane_state *plane_state)
 {
-	struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(pipe->crtc.dev);
-	struct st7735r_priv *priv = container_of(dbidev, struct st7735r_priv,
-						 dbidev);
+	struct st7735r_device *priv = to_st7735r_device(pipe->crtc.dev);
+	struct mipi_dbi_dev *dbidev = &priv->dbidev;
 	struct mipi_dbi *dbi = &dbidev->dbi;
 	int ret, idx;
 	u8 addr_mode;
@@ -184,7 +188,7 @@ static int st7735r_probe(struct spi_device *spi)
 	struct device *dev = &spi->dev;
 	const struct st7735r_cfg *cfg;
 	struct mipi_dbi_dev *dbidev;
-	struct st7735r_priv *priv;
+	struct st7735r_device *priv;
 	struct drm_device *drm;
 	struct mipi_dbi *dbi;
 	struct gpio_desc *dc;
@@ -196,7 +200,7 @@ static int st7735r_probe(struct spi_device *spi)
 		cfg = (void *)spi_get_device_id(spi)->driver_data;
 
 	priv = devm_drm_dev_alloc(dev, &st7735r_driver,
-				  struct st7735r_priv, dbidev.drm);
+				  struct st7735r_device, dbidev.drm);
 	if (IS_ERR(priv))
 		return PTR_ERR(priv);
 
-- 
2.53.0


  parent reply	other threads:[~2026-03-11 10:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 10:10 [PATCH v2 00/16] drm/mipi-dbi: Replace simple-display helpers with regular atomic helpers Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 01/16] drm/mipi-dbi: Only modify planes on enabled CRTCs Thomas Zimmermann
2026-03-11 21:03   ` Claude review: " Claude Code Review Bot
2026-03-11 10:10 ` [PATCH v2 02/16] drm/mipi-dbi: Support custom pipelines with drm_mipi_dbi_dev_init() Thomas Zimmermann
2026-03-11 21:03   ` Claude review: " Claude Code Review Bot
2026-03-11 10:10 ` [PATCH v2 03/16] drm/mipi-dbi: Provide callbacks for atomic interfaces Thomas Zimmermann
2026-03-11 21:03   ` Claude review: " Claude Code Review Bot
2026-03-11 10:10 ` [PATCH v2 04/16] drm/hx8357d: Use regular atomic helpers; drop simple-display helpers Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 05/16] drm/ili9163: " Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 06/16] drm/ili9225: " Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 07/16] drm/ili9341: " Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 08/16] drm/ili9486: " Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 09/16] drm/mi0283qt: " Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 10/16] drm/panel-mipi-dbi: " Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 11/16] drm/st7586: " Thomas Zimmermann
2026-03-11 10:10 ` Thomas Zimmermann [this message]
2026-03-11 10:10 ` [PATCH v2 13/16] drm/st7735r: Rename priv variable to st7735r Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 14/16] drm/st7735r: Use regular atomic helpers; drop simple-display helpers Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 15/16] drm/mipi-dbi: Remove simple-display helpers from mipi-dbi Thomas Zimmermann
2026-03-11 10:10 ` [PATCH v2 16/16] drm/simple-kms: Deprecate simple-kms helpers Thomas Zimmermann
2026-03-11 21:03 ` Claude review: drm/mipi-dbi: Replace simple-display helpers with regular atomic helpers Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260311101438.365997-13-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@gmail.com \
    --cc=architanant5@gmail.com \
    --cc=david@lechnology.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=kamlesh.gurudasani@gmail.com \
    --cc=lanzano.alex@gmail.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=wens@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox