drivers/gpu/drm/panel/panel-visionox-rm69299.c | 3 --- 1 file changed, 3 deletions(-)
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.
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
drivers/gpu/drm/panel/panel-visionox-rm69299.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
index 272490b9565b..1df5303eb57c 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";
@@ -215,8 +214,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
On Mon, Dec 02, 2024 at 02:24:48PM +0800, 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. > > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> > --- > drivers/gpu/drm/panel/panel-visionox-rm69299.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c > index 272490b9565b..1df5303eb57c 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; No, this will break one of the following function calls. Please refactor them too. > ctx->dsi = dsi; > > ctx->supplies[0].supply = "vdda"; > @@ -215,8 +214,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 > -- With best wishes Dmitry
On Mon, Dec 2, 2024 at 8:50 PM Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote: > > On Mon, Dec 02, 2024 at 02:24:48PM +0800, 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. > > > > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> > > --- > > drivers/gpu/drm/panel/panel-visionox-rm69299.c | 3 --- > > 1 file changed, 3 deletions(-) > > > > diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c > > index 272490b9565b..1df5303eb57c 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; > > No, this will break one of the following function calls. Please refactor > them too. You're right. And it mixes usage of `ctx->panel.dev` and `dev`. I'll send v2 getting rid of `ctx->panel.dev`. ChenYu > > ctx->dsi = dsi; > > > > ctx->supplies[0].supply = "vdda"; > > @@ -215,8 +214,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 > > > > -- > With best wishes > Dmitry
© 2016 - 2026 Red Hat, Inc.