diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-04-02 06:47:43 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-04-14 05:34:14 -0400 |
commit | 707cf58a0a847f60f849b44bfb9b85dcc17c599d (patch) | |
tree | 6ce6102524f81cc69614bafaf42298b48783d297 /drivers/gpu/drm | |
parent | 2ec8e3787ae6957f738bb133e755213b9d7c066e (diff) |
drm/omap: fix uninit order in pdev_remove()
When unloading omapdrm driver, the omapdrm platform device is
uninitialized last, after the displays have been disconnected omap_crtc
callbacks have been removed. As the omapdrm pdev uninitialization needs
the features uninitialized in earlier steps, a crash is guaranteed.
This patch fixes the uninitialize order so that the omapdrm pdev is
removed first.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_drv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index bf39fcc49e0f..df3e66416a30 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c | |||
@@ -696,10 +696,11 @@ static int pdev_remove(struct platform_device *device) | |||
696 | { | 696 | { |
697 | DBG(""); | 697 | DBG(""); |
698 | 698 | ||
699 | drm_put_dev(platform_get_drvdata(device)); | ||
700 | |||
699 | omap_disconnect_dssdevs(); | 701 | omap_disconnect_dssdevs(); |
700 | omap_crtc_pre_uninit(); | 702 | omap_crtc_pre_uninit(); |
701 | 703 | ||
702 | drm_put_dev(platform_get_drvdata(device)); | ||
703 | return 0; | 704 | return 0; |
704 | } | 705 | } |
705 | 706 | ||