mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jessica Zhang <quic_jesszhan@quicinc.com>
To: Chen-Yu Tsai <wenst@chromium.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] drm/panel: visionox-rm69299: Remove redundant assignments of panel fields
Date: Thu, 5 Dec 2024 09:54:02 -0800	[thread overview]
Message-ID: <e4bf2d14-395a-4147-97f1-e5fb41669822@quicinc.com> (raw)
In-Reply-To: <20241204093942.1374693-1-wenst@chromium.org>



On 12/4/2024 1:39 AM, Chen-Yu Tsai wrote:
> drm_panel_init() was made to initialize the fields in |struct drm_panel|.
> There is no need to separately initialize them again.
> 
> Drop the separate assignments that are redundant. Also fix up any uses
> of `ctx->panel.dev` to use `dev` directly.
> 
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>

Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>

> ---
> Changes since v1:
> - Also fix uses of `ctx->panel.dev`
> 
>   drivers/gpu/drm/panel/panel-visionox-rm69299.c | 9 ++-------
>   1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
> index 272490b9565b..be3a9797fbce 100644
> --- a/drivers/gpu/drm/panel/panel-visionox-rm69299.c
> +++ b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
> @@ -193,7 +193,6 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)
>   
>   	mipi_dsi_set_drvdata(dsi, ctx);
>   
> -	ctx->panel.dev = dev;
>   	ctx->dsi = dsi;
>   
>   	ctx->supplies[0].supply = "vdda";
> @@ -201,13 +200,11 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)
>   	ctx->supplies[1].supply = "vdd3p3";
>   	ctx->supplies[1].init_load_uA = 13200;
>   
> -	ret = devm_regulator_bulk_get(ctx->panel.dev, ARRAY_SIZE(ctx->supplies),
> -				      ctx->supplies);
> +	ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), ctx->supplies);
>   	if (ret < 0)
>   		return ret;
>   
> -	ctx->reset_gpio = devm_gpiod_get(ctx->panel.dev,
> -					 "reset", GPIOD_OUT_LOW);
> +	ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
>   	if (IS_ERR(ctx->reset_gpio)) {
>   		dev_err(dev, "cannot get reset gpio %ld\n", PTR_ERR(ctx->reset_gpio));
>   		return PTR_ERR(ctx->reset_gpio);
> @@ -215,8 +212,6 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)
>   
>   	drm_panel_init(&ctx->panel, dev, &visionox_rm69299_drm_funcs,
>   		       DRM_MODE_CONNECTOR_DSI);
> -	ctx->panel.dev = dev;
> -	ctx->panel.funcs = &visionox_rm69299_drm_funcs;
>   	drm_panel_add(&ctx->panel);
>   
>   	dsi->lanes = 4;
> -- 
> 2.47.0.338.g60cca15819-goog
> 


  reply	other threads:[~2024-12-05 17:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-04  9:39 Chen-Yu Tsai
2024-12-05 17:54 ` Jessica Zhang [this message]
2024-12-05 19:37 ` Dmitry Baryshkov

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=e4bf2d14-395a-4147-97f1-e5fb41669822@quicinc.com \
    --to=quic_jesszhan@quicinc.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=wenst@chromium.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

all inboxes | Powered by JetHome®