File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -821,9 +821,6 @@ static int khadas_ts050_panel_add(struct khadas_ts050_panel *khadas_ts050)
821
821
return dev_err_probe (dev , PTR_ERR (khadas_ts050 -> enable_gpio ),
822
822
"failed to get enable gpio" );
823
823
824
- drm_panel_init (& khadas_ts050 -> base , & khadas_ts050 -> link -> dev ,
825
- & khadas_ts050_panel_funcs , DRM_MODE_CONNECTOR_DSI );
826
-
827
824
err = drm_panel_of_backlight (& khadas_ts050 -> base );
828
825
if (err )
829
826
return err ;
@@ -850,10 +847,12 @@ static int khadas_ts050_panel_probe(struct mipi_dsi_device *dsi)
850
847
dsi -> mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
851
848
MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET ;
852
849
853
- khadas_ts050 = devm_kzalloc (& dsi -> dev , sizeof (* khadas_ts050 ),
854
- GFP_KERNEL );
855
- if (!khadas_ts050 )
856
- return - ENOMEM ;
850
+ khadas_ts050 = devm_drm_panel_alloc (& dsi -> dev , __typeof (* khadas_ts050 ),
851
+ base , & khadas_ts050_panel_funcs ,
852
+ DRM_MODE_CONNECTOR_DSI );
853
+
854
+ if (IS_ERR (khadas_ts050 ))
855
+ return PTR_ERR (khadas_ts050 );
857
856
858
857
khadas_ts050 -> panel_data = (struct khadas_ts050_panel_data * )data ;
859
858
mipi_dsi_set_drvdata (dsi , khadas_ts050 );
You can’t perform that action at this time.
0 commit comments