]> Git Repo - J-linux.git/commitdiff
drm/panel: otm8009a: Set backlight parent to panel device
authorJames Cowgill <[email protected]>
Wed, 12 Apr 2023 17:35:07 +0000 (17:35 +0000)
committerNeil Armstrong <[email protected]>
Mon, 17 Apr 2023 07:43:05 +0000 (09:43 +0200)
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 <[email protected]>
Cc: [email protected]
Reviewed-by: Neil Armstrong <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/panel/panel-orisetech-otm8009a.c

index b4729a94c34a8e2c99d412815128529c23595ef2..898b892f1143943e8eee68d4a4c6d862ec448c19 100644 (file)
@@ -471,7 +471,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)) {
This page took 0.057039 seconds and 4 git commands to generate.