diff options
author | Thierry Reding <treding@nvidia.com> | 2014-11-04 16:17:02 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-12-19 10:19:56 +0100 |
commit | a504b7ceecd45639127a5bf6a1dd7d8c641e3a58 (patch) | |
tree | 4b326cc02a377d0f067d4ff0de0028bd533eaf6b | |
parent | ccdea09f1345d47f98c53838cc7d0a1af947f177 (diff) |
drm/panel: Drop driver references to panels
With proper reference counting in place, make sure that drivers drop
their private references when unloading.
Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r-- | drivers/gpu/drm/panel/panel-ld9040.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/panel/panel-s6e8aa0.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/panel/panel-simple.c | 2 |
4 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/panel/panel-ld9040.c b/drivers/gpu/drm/panel/panel-ld9040.c index 08cf2c588c3..109b65073f8 100644 --- a/drivers/gpu/drm/panel/panel-ld9040.c +++ b/drivers/gpu/drm/panel/panel-ld9040.c @@ -363,6 +363,7 @@ static int ld9040_remove(struct spi_device *spi) ld9040_power_off(ctx); drm_panel_remove(&ctx->panel); + drm_panel_unref(&ctx->panel); return 0; } diff --git a/drivers/gpu/drm/panel/panel-s6e8aa0.c b/drivers/gpu/drm/panel/panel-s6e8aa0.c index 144b2733e3d..a47695af1b1 100644 --- a/drivers/gpu/drm/panel/panel-s6e8aa0.c +++ b/drivers/gpu/drm/panel/panel-s6e8aa0.c @@ -1037,6 +1037,7 @@ static int s6e8aa0_remove(struct mipi_dsi_device *dsi) mipi_dsi_detach(dsi); drm_panel_remove(&ctx->panel); + drm_panel_unref(&ctx->panel); return 0; } diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c index 9d81759d82f..ad9dc9ba11d 100644 --- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c +++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c @@ -358,6 +358,9 @@ static void sharp_panel_del(struct sharp_panel *sharp) if (sharp->link2) put_device(&sharp->link2->dev); + + if (sharp->base.dev) + drm_panel_unref(&sharp->base); } static int sharp_panel_probe(struct mipi_dsi_device *dsi) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index e95385bf835..0dd3ccb4b53 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -312,6 +312,8 @@ static int panel_simple_remove(struct device *dev) if (panel->backlight) put_device(&panel->backlight->dev); + drm_panel_unref(&panel->base); + return 0; } |