summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cowgill <james.cowgill@blaize.com>2023-04-12 20:35:07 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-17 12:50:25 +0300
commit61b694b742fb2c35753071758b25cc95cdc9714d (patch)
treeaf3b58a1480497ec10ddf8e05ad04ef5d0fe4f8b
parent8f57f3e112cf1d16682b6ff9c31c72f40f7da9c9 (diff)
downloadlinux-61b694b742fb2c35753071758b25cc95cdc9714d.tar.xz
drm/panel: otm8009a: Set backlight parent to panel device
commit ab4f869fba6119997f7630d600049762a2b014fa upstream. This is the logical place to put the backlight device, and it also fixes a kernel crash if the MIPI host is removed. Previously the backlight device would be unregistered twice when this happened - once as a child of the MIPI host through `mipi_dsi_host_unregister`, and once when the panel device is destroyed. Fixes: 12a6cbd4f3f1 ("drm/panel: otm8009a: Use new backlight API") Signed-off-by: James Cowgill <james.cowgill@blaize.com> Cc: stable@vger.kernel.org Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230412173450.199592-1-james.cowgill@blaize.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/panel/panel-orisetech-otm8009a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
index f80b44a8a700..f8dbccd55033 100644
--- a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
+++ b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
@@ -444,7 +444,7 @@ static int otm8009a_probe(struct mipi_dsi_device *dsi)
DRM_MODE_CONNECTOR_DSI);
ctx->bl_dev = devm_backlight_device_register(dev, dev_name(dev),
- dsi->host->dev, ctx,
+ dev, ctx,
&otm8009a_backlight_ops,
NULL);
if (IS_ERR(ctx->bl_dev)) {