msm: mdss: unregister wled in case of probe failure

If the DSI probe fails and wled has been registered, then
when the next time probe comes there are failures seen.
Fix this by unregistering the wled in case of DSI probe
failures.

Change-Id: Ia3fd2fa2b5f5bd446c15bc4c28602846f8540a68
Signed-off-by: Vineet Bajaj <vbajaj@codeaurora.org>
This commit is contained in:
Vineet Bajaj 2015-05-27 19:26:53 +05:30
parent 235d3b6b67
commit 8badfac731
3 changed files with 8 additions and 0 deletions

View file

@ -2601,6 +2601,7 @@ static int mdss_dsi_ctrl_probe(struct platform_device *pdev)
return 0;
error_pan_node:
mdss_dsi_unregister_bl_settings(ctrl_pdata);
of_node_put(dsi_pan_node);
return rc;
}

View file

@ -563,6 +563,7 @@ int mdss_panel_get_dst_fmt(u32 bpp, char mipi_mode, u32 pixel_packing,
int mdss_dsi_register_recovery_handler(struct mdss_dsi_ctrl_pdata *ctrl,
struct mdss_intf_recovery *recovery);
void mdss_dsi_unregister_bl_settings(struct mdss_dsi_ctrl_pdata *ctrl_pdata);
static inline const char *__mdss_dsi_pm_name(enum dsi_pm_type module)
{

View file

@ -1499,6 +1499,12 @@ int mdss_panel_parse_bl_settings(struct device_node *np,
return 0;
}
void mdss_dsi_unregister_bl_settings(struct mdss_dsi_ctrl_pdata *ctrl_pdata)
{
if (ctrl_pdata->bklt_ctrl == BL_WLED)
led_trigger_unregister_simple(bl_led_trigger);
}
static int mdss_panel_parse_dt(struct device_node *np,
struct mdss_dsi_ctrl_pdata *ctrl_pdata)
{