drm/mediatek: don't use drm_put_dev
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 8 Dec 2016 11:07:38 +0000 (12:07 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 13 Dec 2016 17:12:43 +0000 (18:12 +0100)
fsl is already fully demidlayered in the probe function, but for
convenience stuck with drm_put_dev. Call the unregister/unref parts
separately, to make sure this driver works correct.

Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: CK Hu <ck.hu@mediatek.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161208110739.24417-3-daniel.vetter@ffwll.ch
drivers/gpu/drm/mediatek/mtk_drm_drv.c

index 4b7fe7eaec014d8404ea5b26967d1c0ca2113942..b5f88e6d078e6992cc99e13743e59671bd36ae4f 100644 (file)
@@ -321,7 +321,8 @@ static void mtk_drm_unbind(struct device *dev)
 {
        struct mtk_drm_private *private = dev_get_drvdata(dev);
 
-       drm_put_dev(private->drm);
+       drm_dev_unregister(private->drm);
+       drm_dev_unref(private->drm);
        private->drm = NULL;
 }