[PATCH 3/4] drm/mediatek: don't use drm_put_dev
Daniel Vetter
daniel at ffwll.ch
Tue Dec 13 17:14:39 UTC 2016
On Tue, Dec 13, 2016 at 11:55:32AM +0100, Lucas Stach wrote:
> Am Donnerstag, den 08.12.2016, 12:07 +0100 schrieb Daniel Vetter:
> > fsl is already fully demidlayered in the probe function, but for
> ^ mediatek not fsl-dcu
>
> > convenience stuck with drm_put_dev. Call the unregister/unref parts
> > separately, to make sure this driver works correct.
> >
> I don't really see the benefit here, except you want to get rid of
> drm_dev_put() completely from the core. But whatever:
Yeah, that's the idea. Also I like probe/remove paths to be symmetric,
this achieves this.
> Reviewed-by: Lucas Stach <l.stach at pengutronix.de>
Merged this and the etnaviv patch to drm-misc, thanks for your review.
-Daniel
>
> > Cc: Philipp Zabel <p.zabel at pengutronix.de>
> > Cc: CK Hu <ck.hu at mediatek.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> > ---
> > drivers/gpu/drm/mediatek/mtk_drm_drv.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > index 4b7fe7eaec01..b5f88e6d078e 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > @@ -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;
> > }
> >
>
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dri-devel
mailing list