Commit 2f4b769e authored by Paul Cercueil's avatar Paul Cercueil

drm/panel: novatek,nt39016: Reorder calls in probe

The drm_panel_of_backlight() function must be called after
drm_panel_init(), according to the function's documentation; otherwise
the backlight won't be properly initialized.
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20200820121256.32037-2-paul@crapouillou.net
parent 0b062865
......@@ -285,6 +285,9 @@ static int nt39016_probe(struct spi_device *spi)
return PTR_ERR(panel->map);
}
drm_panel_init(&panel->drm_panel, dev, &nt39016_funcs,
DRM_MODE_CONNECTOR_DPI);
err = drm_panel_of_backlight(&panel->drm_panel);
if (err) {
if (err != -EPROBE_DEFER)
......@@ -292,9 +295,6 @@ static int nt39016_probe(struct spi_device *spi)
return err;
}
drm_panel_init(&panel->drm_panel, dev, &nt39016_funcs,
DRM_MODE_CONNECTOR_DPI);
drm_panel_add(&panel->drm_panel);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment