Browse Source

disp: msm: dsi: Use devm_pwm_get instead of devm_of_pwm_get

devm_of_pwm_get is deprecated and need to change
to devm_pwm_get.

Change-Id: Ibeee90261ff40dc50b6a5e40e583bee11a5b177c
Signed-off-by: Maria Yu <[email protected]>
Signed-off-by: Vara Reddy <[email protected]>
Vara Reddy 2 năm trước cách đây
mục cha
commit
8eff68bdf0
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      msm/dsi/dsi_panel.c

+ 4 - 0
msm/dsi/dsi_panel.c

@@ -700,7 +700,11 @@ static int dsi_panel_pwm_register(struct dsi_panel *panel)
 	int rc = 0;
 	struct dsi_backlight_config *bl = &panel->bl_config;
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0))
+	bl->pwm_bl = devm_pwm_get(panel->parent, NULL);
+#else
 	bl->pwm_bl = devm_of_pwm_get(panel->parent, panel->panel_of_node, NULL);
+#endif
 	if (IS_ERR_OR_NULL(bl->pwm_bl)) {
 		rc = PTR_ERR(bl->pwm_bl);
 		DSI_ERR("[%s] failed to request pwm, rc=%d\n", panel->name,