drm/tilcdc: replace reference/unreference() with get/put
authorAishwarya Pant <aishpant@gmail.com>
Tue, 26 Sep 2017 08:30:19 +0000 (14:00 +0530)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 26 Sep 2017 11:12:15 +0000 (13:12 +0200)
For maintaining consistency with kernel coding style replace
reference/unreference in ref counting functions with get/put.

The following cocci script was used to generate the tilcdc patch:

@@
expression ex;
@@

(
-drm_framebuffer_unreference(ex);
+drm_framebuffer_put(ex);
|
-drm_dev_unref(ex);
+drm_dev_put(ex);
|
-drm_framebuffer_reference(ex);
+drm_framebuffer_get(ex);
)

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Acked-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/3f2f592f6ea28adfea3fd8b70421b2fab38f0b94.1506413698.git.aishpant@gmail.com
drivers/gpu/drm/tilcdc/tilcdc_crtc.c
drivers/gpu/drm/tilcdc/tilcdc_drv.c

index 406fe4544b83d3351669a91103a0b56207feda82..d2589f310437c600d2fe1a9d027e6f3ce83fd630 100644 (file)
@@ -75,7 +75,7 @@ static void unref_worker(struct drm_flip_work *work, void *val)
        struct drm_device *dev = tilcdc_crtc->base.dev;
 
        mutex_lock(&dev->mode_config.mutex);
-       drm_framebuffer_unreference(val);
+       drm_framebuffer_put(val);
        mutex_unlock(&dev->mode_config.mutex);
 }
 
@@ -456,7 +456,7 @@ static void tilcdc_crtc_set_mode(struct drm_crtc *crtc)
 
        set_scanout(crtc, fb);
 
-       drm_framebuffer_reference(fb);
+       drm_framebuffer_get(fb);
 
        crtc->hwmode = crtc->state->adjusted_mode;
 }
@@ -633,7 +633,7 @@ int tilcdc_crtc_update_fb(struct drm_crtc *crtc,
                return -EBUSY;
        }
 
-       drm_framebuffer_reference(fb);
+       drm_framebuffer_get(fb);
 
        crtc->primary->fb = fb;
        tilcdc_crtc->event = event;
index 146ac9a5a2fd07ab4e7b9ae6b2f1968f9e9072cd..72ce063aa0d88a9532391d7214c88c706ce95aad 100644 (file)
@@ -226,7 +226,7 @@ static void tilcdc_fini(struct drm_device *dev)
 
        pm_runtime_disable(dev->dev);
 
-       drm_dev_unref(dev);
+       drm_dev_put(dev);
 }
 
 static int tilcdc_init(struct drm_driver *ddrv, struct device *dev)