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 <quic_aiquny@quicinc.com>
Signed-off-by: Vara Reddy <quic_varar@quicinc.com>
This commit is contained in:
Vara Reddy
2022-12-14 21:50:44 +08:00
parent de5924f5f5
commit 8eff68bdf0

View File

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