drm/panel: visionox-rm69299: Remove redundant assignments of panel fields
Subsystems (3)
PATCH 1/1 drm/panel: visionox-rm69299: Remove redundant assignments of panel fields
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.
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/panel/panel-visionox-rm69299.c +0 -3
@@ -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 ;
Signature · 1 line
2.47.0.338.g60cca15819-goog
Quoted 15 lines · Chen-Yu Tsai
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 <[email protected]>--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 3 --- 1 file changed, 3 deletions(-)drivers/gpu/drm/panel/panel-visionox-rm69299.c +0
-0
drivers/gpu/drm/panel/panel-visionox-rm69299.c static int visionox_rm69299_probe(struct mipi_dsi_device *dsi) · line 196
Quoted 4 lines
drivers/gpu/drm/panel/panel-visionox-rm69299.c +0
-1@@ -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.
Quoted 15 lines
drivers/gpu/drm/panel/panel-visionox-rm69299.c +0
-2ctx->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 ;Signature · 1 line
2.47.0.338.g60cca15819-goog
Signature · 2 lines
With best wishes Dmitry
Quoted 18 lines · Dmitry Baryshkov
Quoted 16 lines · Chen-Yu Tsai
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 <[email protected]>--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 3 --- 1 file changed, 3 deletions(-)drivers/gpu/drm/panel/panel-visionox-rm69299.c +0
-0@@ -193,7 +193,6 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)
Quoted 6 lines
drivers/gpu/drm/panel/panel-visionox-rm69299.c static int visionox_rm69299_probe(struct mipi_dsi_device *dsi) · line 196
Quoted 3 lines
drivers/gpu/drm/panel/panel-visionox-rm69299.c +0
-1mipi_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
Quoted 19 lines
Quoted 13 lines
drivers/gpu/drm/panel/panel-visionox-rm69299.c +0
-3ctx->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 ; --Quoted 2 lines
2.47.0.338.g60cca15819-goog
--
With best wishes
Dmitry