imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,12 +1,12 @@
 int i915_gem_dmabuf_mock_selftests(void) {
   static const struct i915_subtest tests[] = {
       SUBTEST(igt_dmabuf_export), SUBTEST(igt_dmabuf_import_self), SUBTEST(igt_dmabuf_import), SUBTEST(igt_dmabuf_import_ownership), SUBTEST(igt_dmabuf_export_vmap), SUBTEST(igt_dmabuf_export_kmap),
   };
   struct drm_i915_private *i915;
   int err;
   i915 = mock_gem_device();
   if (!i915) return -ENOMEM;
   err = i915_subtests(tests, i915);
-  drm_dev_unref(&i915->drm);
+  drm_dev_put(&i915->drm);
   return err;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,14 +1,14 @@
 int i915_gem_evict_mock_selftests(void) {
   static const struct i915_subtest tests[] = {
       SUBTEST(igt_evict_something), SUBTEST(igt_evict_for_vma), SUBTEST(igt_evict_for_cache_color), SUBTEST(igt_evict_vm), SUBTEST(igt_overcommit),
   };
   struct drm_i915_private *i915;
   int err;
   i915 = mock_gem_device();
   if (!i915) return -ENOMEM;
   mutex_lock(&i915->drm.struct_mutex);
   err = i915_subtests(tests, i915);
   mutex_unlock(&i915->drm.struct_mutex);
-  drm_dev_unref(&i915->drm);
+  drm_dev_put(&i915->drm);
   return err;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,14 +1,14 @@
 int i915_gem_gtt_mock_selftests(void) {
   static const struct i915_subtest tests[] = {
       SUBTEST(igt_mock_drunk), SUBTEST(igt_mock_walk), SUBTEST(igt_mock_pot), SUBTEST(igt_mock_fill), SUBTEST(igt_gtt_reserve), SUBTEST(igt_gtt_insert),
   };
   struct drm_i915_private *i915;
   int err;
   i915 = mock_gem_device();
   if (!i915) return -ENOMEM;
   mutex_lock(&i915->drm.struct_mutex);
   err = i915_subtests(tests, i915);
   mutex_unlock(&i915->drm.struct_mutex);
-  drm_dev_unref(&i915->drm);
+  drm_dev_put(&i915->drm);
   return err;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,13 +1,13 @@
 int i915_gem_object_mock_selftests(void) {
   static const struct i915_subtest tests[] = {
       SUBTEST(igt_gem_object),
       SUBTEST(igt_phys_object),
   };
   struct drm_i915_private *i915;
   int err;
   i915 = mock_gem_device();
   if (!i915) return -ENOMEM;
   err = i915_subtests(tests, i915);
-  drm_dev_unref(&i915->drm);
+  drm_dev_put(&i915->drm);
   return err;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,15 +1,15 @@
 int i915_request_mock_selftests(void) {
   static const struct i915_subtest tests[] = {
       SUBTEST(igt_add_request),
       SUBTEST(igt_wait_request),
       SUBTEST(igt_fence_wait),
       SUBTEST(igt_request_rewind),
   };
   struct drm_i915_private *i915;
   int err;
   i915 = mock_gem_device();
   if (!i915) return -ENOMEM;
   err = i915_subtests(tests, i915);
-  drm_dev_unref(&i915->drm);
+  drm_dev_put(&i915->drm);
   return err;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,17 +1,17 @@
 int i915_vma_mock_selftests(void) {
   static const struct i915_subtest tests[] = {
       SUBTEST(igt_vma_create),
       SUBTEST(igt_vma_pin1),
       SUBTEST(igt_vma_rotate),
       SUBTEST(igt_vma_partial),
   };
   struct drm_i915_private *i915;
   int err;
   i915 = mock_gem_device();
   if (!i915) return -ENOMEM;
   mutex_lock(&i915->drm.struct_mutex);
   err = i915_subtests(tests, i915);
   mutex_unlock(&i915->drm.struct_mutex);
-  drm_dev_unref(&i915->drm);
+  drm_dev_put(&i915->drm);
   return err;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,14 +1,14 @@
 int intel_breadcrumbs_mock_selftests(void) {
   static const struct i915_subtest tests[] = {
       SUBTEST(igt_random_insert_remove),
       SUBTEST(igt_insert_complete),
       SUBTEST(igt_wakeup),
   };
   struct drm_i915_private *i915;
   int err;
   i915 = mock_gem_device();
   if (!i915) return -ENOMEM;
   err = i915_subtests(tests, i915->engine[RCS]);
-  drm_dev_unref(&i915->drm);
+  drm_dev_put(&i915->drm);
   return err;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,15 +1,15 @@
 static int nouveau_platform_probe(struct platform_device *pdev) {
   const struct nvkm_device_tegra_func *func;
   struct nvkm_device *device = NULL;
   struct drm_device *drm;
   int ret;
   func = of_device_get_match_data(&pdev->dev);
   drm = nouveau_platform_device_create(func, pdev, &device);
   if (IS_ERR(drm)) return PTR_ERR(drm);
   ret = drm_dev_register(drm, 0);
   if (ret < 0) {
-    drm_dev_unref(drm);
+    drm_dev_put(drm);
     return ret;
   }
   return 0;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,46 +1,46 @@
 static int amdgpu_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {
   struct drm_device *dev;
   unsigned long flags = ent->driver_data;
   int ret, retry = 0;
   bool supports_atomic = false;
   if (!amdgpu_virtual_display && amdgpu_device_asic_has_dc_support(flags & AMD_ASIC_MASK)) supports_atomic = true;
   if ((flags & AMD_EXP_HW_SUPPORT) && !amdgpu_exp_hw_support) {
     DRM_INFO("This hardware requires experimental hardware support.\n"
              "See modparam exp_hw_support\n");
     return -ENODEV;
   }
   /*
    * Initialize amdkfd before starting radeon. If it was not loaded yet,
    * defer radeon probing
    */
   ret = amdgpu_amdkfd_init();
   if (ret == -EPROBE_DEFER) return ret;
   /* Get rid of things like offb */
   ret = amdgpu_kick_out_firmware_fb(pdev);
   if (ret) return ret;
   /* warn the user if they mix atomic and non-atomic capable GPUs */
   if ((kms_driver.driver_features & DRIVER_ATOMIC) && !supports_atomic) DRM_ERROR("Mixing atomic and non-atomic capable GPUs!\n");
   /* support atomic early so the atomic debugfs stuff gets created */
   if (supports_atomic) kms_driver.driver_features |= DRIVER_ATOMIC;
   dev = drm_dev_alloc(&kms_driver, &pdev->dev);
   if (IS_ERR(dev)) return PTR_ERR(dev);
   ret = pci_enable_device(pdev);
   if (ret) goto err_free;
   dev->pdev = pdev;
   pci_set_drvdata(pdev, dev);
 retry_init:
   ret = drm_dev_register(dev, ent->driver_data);
   if (ret == -EAGAIN && ++retry <= 3) {
     DRM_INFO("retry init %d\n", retry);
     /* Don't request EX mode too frequently which is attacking */
     msleep(5000);
     goto retry_init;
   } else if (ret)
     goto err_pci;
   return 0;
 err_pci:
   pci_disable_device(pdev);
 err_free:
-  drm_dev_unref(dev);
+  drm_dev_put(dev);
   return ret;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,7 +1,7 @@
 static void amdgpu_pci_remove(struct pci_dev *pdev) {
   struct drm_device *dev = pci_get_drvdata(pdev);
   drm_dev_unregister(dev);
-  drm_dev_unref(dev);
+  drm_dev_put(dev);
   pci_disable_device(pdev);
   pci_set_drvdata(pdev, NULL);
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,25 +1,25 @@
 static int sti_bind(struct device *dev) {
   struct drm_device *ddev;
   int ret;
   ddev = drm_dev_alloc(&sti_driver, dev);
   if (IS_ERR(ddev)) return PTR_ERR(ddev);
   ret = sti_init(ddev);
   if (ret) goto err_drm_dev_unref;
   ret = component_bind_all(ddev->dev, ddev);
   if (ret) goto err_cleanup;
   ret = drm_dev_register(ddev, 0);
   if (ret) goto err_register;
   drm_mode_config_reset(ddev);
   if (ddev->mode_config.num_connector) {
     ret = drm_fb_cma_fbdev_init(ddev, 32, 0);
     if (ret) DRM_DEBUG_DRIVER("Warning: fails to create fbdev\n");
   }
   return 0;
 err_register:
   drm_mode_config_cleanup(ddev);
 err_cleanup:
   sti_cleanup(ddev);
 err_drm_dev_unref:
-  drm_dev_unref(ddev);
+  drm_dev_put(ddev);
   return ret;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,6 +1,6 @@
 static void sti_unbind(struct device *dev) {
   struct drm_device *ddev = dev_get_drvdata(dev);
   drm_dev_unregister(ddev);
   sti_cleanup(ddev);
-  drm_dev_unref(ddev);
+  drm_dev_put(ddev);
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,17 +1,17 @@
 static int stm_drm_platform_probe(struct platform_device *pdev) {
   struct device *dev = &pdev->dev;
   struct drm_device *ddev;
   int ret;
   DRM_DEBUG("%s\n", __func__);
   dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
   ddev = drm_dev_alloc(&drv_driver, dev);
   if (IS_ERR(ddev)) return PTR_ERR(ddev);
   ret = drv_load(ddev);
   if (ret) goto err_unref;
   ret = drm_dev_register(ddev, 0);
   if (ret) goto err_unref;
   return 0;
 err_unref:
-  drm_dev_unref(ddev);
+  drm_dev_put(ddev);
   return ret;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,8 +1,8 @@
 static int stm_drm_platform_remove(struct platform_device *pdev) {
   struct drm_device *ddev = platform_get_drvdata(pdev);
   DRM_DEBUG("%s\n", __func__);
   drm_dev_unregister(ddev);
   drv_unload(ddev);
-  drm_dev_unref(ddev);
+  drm_dev_put(ddev);
   return 0;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,73 +1,73 @@
 static int imx_drm_bind(struct device *dev) {
   struct drm_device *drm;
   struct imx_drm_device *imxdrm;
   int ret;
   drm = drm_dev_alloc(&imx_drm_driver, dev);
   if (IS_ERR(drm)) return PTR_ERR(drm);
   imxdrm = devm_kzalloc(dev, sizeof(*imxdrm), GFP_KERNEL);
   if (!imxdrm) {
     ret = -ENOMEM;
     goto err_unref;
   }
   imxdrm->drm = drm;
   drm->dev_private = imxdrm;
   /*
    * enable drm irq mode.
    * - with irq_enabled = true, we can use the vblank feature.
    *
    * P.S. note that we wouldn't use drm irq handler but
    *      just specific driver own one instead because
    *      drm framework supports only one irq handler and
    *      drivers can well take care of their interrupts
    */
   drm->irq_enabled = true;
   /*
    * set max width and height as default value(4096x4096).
    * this value would be used to check framebuffer size limitation
    * at drm_mode_addfb().
    */
   drm->mode_config.min_width = 1;
   drm->mode_config.min_height = 1;
   drm->mode_config.max_width = 4096;
   drm->mode_config.max_height = 4096;
   drm->mode_config.funcs = &imx_drm_mode_config_funcs;
   drm->mode_config.helper_private = &imx_drm_mode_config_helpers;
   drm->mode_config.allow_fb_modifiers = true;
   drm_mode_config_init(drm);
   ret = drm_vblank_init(drm, MAX_CRTC);
   if (ret) goto err_kms;
   dev_set_drvdata(dev, drm);
   /* Now try and bind all our sub-components */
   ret = component_bind_all(dev, drm);
   if (ret) goto err_kms;
   drm_mode_config_reset(drm);
   /*
    * All components are now initialised, so setup the fb helper.
    * The fb helper takes copies of key hardware information, so the
    * crtcs/connectors/encoders must not change after this point.
    */
 #if IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION)
   if (legacyfb_depth != 16 && legacyfb_depth != 32) {
     dev_warn(dev, "Invalid legacyfb_depth.  Defaulting to 16bpp\n");
     legacyfb_depth = 16;
   }
   ret = drm_fb_cma_fbdev_init(drm, legacyfb_depth, MAX_CRTC);
   if (ret) goto err_unbind;
 #endif
   drm_kms_helper_poll_init(drm);
   ret = drm_dev_register(drm, 0);
   if (ret) goto err_fbhelper;
   return 0;
 err_fbhelper:
   drm_kms_helper_poll_fini(drm);
 #if IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION)
   drm_fb_cma_fbdev_fini(drm);
 err_unbind:
 #endif
   component_unbind_all(drm->dev, drm);
 err_kms:
   drm_mode_config_cleanup(drm);
 err_unref:
-  drm_dev_unref(drm);
+  drm_dev_put(drm);
   return ret;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,10 +1,10 @@
 static void imx_drm_unbind(struct device *dev) {
   struct drm_device *drm = dev_get_drvdata(dev);
   drm_dev_unregister(drm);
   drm_kms_helper_poll_fini(drm);
   drm_fb_cma_fbdev_fini(drm);
   drm_mode_config_cleanup(drm);
   component_unbind_all(drm->dev, drm);
   dev_set_drvdata(dev, NULL);
-  drm_dev_unref(drm);
+  drm_dev_put(drm);
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,20 +1,20 @@
 static int mtk_drm_bind(struct device *dev) {
   struct mtk_drm_private *private = dev_get_drvdata(dev);
   struct drm_device *drm;
   int ret;
   drm = drm_dev_alloc(&mtk_drm_driver, dev);
   if (IS_ERR(drm)) return PTR_ERR(drm);
   drm->dev_private = private;
 private
   ->drm = drm;
   ret = mtk_drm_kms_init(drm);
   if (ret < 0) goto err_free;
   ret = drm_dev_register(drm, 0);
   if (ret < 0) goto err_deinit;
   return 0;
 err_deinit:
   mtk_drm_kms_deinit(drm);
 err_free:
-  drm_dev_unref(drm);
+  drm_dev_put(drm);
   return ret;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,14 +1,14 @@
 static int mtk_drm_remove(struct platform_device *pdev) {
   struct mtk_drm_private *private = platform_get_drvdata(pdev);
   struct drm_device *drm = private->drm;
   int i;
   drm_dev_unregister(drm);
   mtk_drm_kms_deinit(drm);
-  drm_dev_unref(drm);
+  drm_dev_put(drm);
   component_master_del(&pdev->dev, &mtk_drm_ops);
   pm_runtime_disable(&pdev->dev);
   of_node_put(private->mutex_node);
   for (i = 0; i < DDP_COMPONENT_ID_MAX; i++)
     of_node_put(private->comp_node[i]);
   return 0;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,7 +1,7 @@
 static void mtk_drm_unbind(struct device *dev) {
   struct mtk_drm_private *private = dev_get_drvdata(dev);
   drm_dev_unregister(private->drm);
-  drm_dev_unref(private->drm);
+  drm_dev_put(private->drm);
 private
   ->drm = NULL;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,58 +1,58 @@
 static int pl111_amba_probe(struct amba_device *amba_dev, const struct amba_id *id) {
   struct device *dev = &amba_dev->dev;
   struct pl111_drm_dev_private *priv;
   const struct pl111_variant_data *variant = id->data;
   struct drm_device *drm;
   int ret;
   priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
   if (!priv) return -ENOMEM;
   drm = drm_dev_alloc(&pl111_drm_driver, dev);
   if (IS_ERR(drm)) return PTR_ERR(drm);
   amba_set_drvdata(amba_dev, drm);
   priv->drm = drm;
   drm->dev_private = priv;
   priv->variant = variant;
   ret = of_reserved_mem_device_init(dev);
   if (!ret) {
     dev_info(dev, "using device-specific reserved memory\n");
     priv->use_device_memory = true;
   }
   if (of_property_read_u32(dev->of_node, "max-memory-bandwidth", &priv->memory_bw)) {
     dev_info(dev, "no max memory bandwidth specified, assume unlimited\n");
     priv->memory_bw = 0;
   }
   /* The two main variants swap this register */
   if (variant->is_pl110 || variant->is_lcdc) {
     priv->ienb = CLCD_PL110_IENB;
     priv->ctrl = CLCD_PL110_CNTL;
   } else {
     priv->ienb = CLCD_PL111_IENB;
     priv->ctrl = CLCD_PL111_CNTL;
   }
   priv->regs = devm_ioremap_resource(dev, &amba_dev->res);
   if (IS_ERR(priv->regs)) {
     dev_err(dev, "%s failed mmio\n", __func__);
     ret = PTR_ERR(priv->regs);
     goto dev_unref;
   }
   /* This may override some variant settings */
   ret = pl111_versatile_init(dev, priv);
   if (ret) goto dev_unref;
   pl111_nomadik_init(dev);
   /* turn off interrupts before requesting the irq */
   writel(0, priv->regs + priv->ienb);
   ret = devm_request_irq(dev, amba_dev->irq[0], pl111_irq, 0, variant->name, priv);
   if (ret != 0) {
     dev_err(dev, "%s failed irq %d\n", __func__, ret);
     return ret;
   }
   ret = pl111_modeset_init(drm);
   if (ret != 0) goto dev_unref;
   ret = drm_dev_register(drm, 0);
   if (ret < 0) goto dev_unref;
   return 0;
 dev_unref:
-  drm_dev_unref(drm);
+  drm_dev_put(drm);
   of_reserved_mem_device_release(dev);
   return ret;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,12 +1,12 @@
 static int pl111_amba_remove(struct amba_device *amba_dev) {
   struct device *dev = &amba_dev->dev;
   struct drm_device *drm = amba_get_drvdata(amba_dev);
   struct pl111_drm_dev_private *priv = drm->dev_private;
   drm_dev_unregister(drm);
   drm_fb_cma_fbdev_fini(drm);
   if (priv->panel) drm_panel_bridge_remove(priv->bridge);
   drm_mode_config_cleanup(drm);
-  drm_dev_unref(drm);
+  drm_dev_put(drm);
   of_reserved_mem_device_release(dev);
   return 0;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,53 +1,53 @@
 static int sun4i_drv_bind(struct device *dev) {
   struct drm_device *drm;
   struct sun4i_drv *drv;
   int ret;
   drm = drm_dev_alloc(&sun4i_drv_driver, dev);
   if (IS_ERR(drm)) return PTR_ERR(drm);
   drv = devm_kzalloc(dev, sizeof(*drv), GFP_KERNEL);
   if (!drv) {
     ret = -ENOMEM;
     goto free_drm;
   }
   drm->dev_private = drv;
   INIT_LIST_HEAD(&drv->frontend_list);
   INIT_LIST_HEAD(&drv->engine_list);
   INIT_LIST_HEAD(&drv->tcon_list);
   ret = of_reserved_mem_device_init(dev);
   if (ret && ret != -ENODEV) {
     dev_err(drm->dev, "Couldn't claim our memory region\n");
     goto free_drm;
   }
   drm_mode_config_init(drm);
   ret = component_bind_all(drm->dev, drm);
   if (ret) {
     dev_err(drm->dev, "Couldn't bind all pipelines components\n");
     goto cleanup_mode_config;
   }
   /* drm_vblank_init calls kcalloc, which can fail */
   ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
   if (ret) goto cleanup_mode_config;
   drm->irq_enabled = true;
   /* Remove early framebuffers (ie. simplefb) */
   sun4i_remove_framebuffers();
   /* Create our framebuffer */
   ret = sun4i_framebuffer_init(drm);
   if (ret) {
     dev_err(drm->dev, "Couldn't create our framebuffer\n");
     goto cleanup_mode_config;
   }
   /* Enable connectors polling */
   drm_kms_helper_poll_init(drm);
   ret = drm_dev_register(drm, 0);
   if (ret) goto finish_poll;
   return 0;
 finish_poll:
   drm_kms_helper_poll_fini(drm);
   sun4i_framebuffer_free(drm);
 cleanup_mode_config:
   drm_mode_config_cleanup(drm);
   of_reserved_mem_device_release(dev);
 free_drm:
-  drm_dev_unref(drm);
+  drm_dev_put(drm);
   return ret;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,9 +1,9 @@
 static void sun4i_drv_unbind(struct device *dev) {
   struct drm_device *drm = dev_get_drvdata(dev);
   drm_dev_unregister(drm);
   drm_kms_helper_poll_fini(drm);
   sun4i_framebuffer_free(drm);
   drm_mode_config_cleanup(drm);
   of_reserved_mem_device_release(dev);
-  drm_dev_unref(drm);
+  drm_dev_put(drm);
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,33 +1,33 @@
 static int vc4_drm_bind(struct device *dev) {
   struct platform_device *pdev = to_platform_device(dev);
   struct drm_device *drm;
   struct vc4_dev *vc4;
   int ret = 0;
   dev->coherent_dma_mask = DMA_BIT_MASK(32);
   vc4 = devm_kzalloc(dev, sizeof(*vc4), GFP_KERNEL);
   if (!vc4) return -ENOMEM;
   drm = drm_dev_alloc(&vc4_drm_driver, dev);
   if (IS_ERR(drm)) return PTR_ERR(drm);
   platform_set_drvdata(pdev, drm);
   vc4->dev = drm;
   drm->dev_private = vc4;
   ret = vc4_bo_cache_init(drm);
   if (ret) goto dev_unref;
   drm_mode_config_init(drm);
   vc4_gem_init(drm);
   ret = component_bind_all(dev, drm);
   if (ret) goto gem_destroy;
   vc4_kick_out_firmware_fb();
   ret = drm_dev_register(drm, 0);
   if (ret < 0) goto unbind_all;
   vc4_kms_load(drm);
   return 0;
 unbind_all:
   component_unbind_all(dev, drm);
 gem_destroy:
   vc4_gem_destroy(drm);
   vc4_bo_cache_destroy(drm);
 dev_unref:
-  drm_dev_unref(drm);
+  drm_dev_put(drm);
   return ret;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,9 +1,9 @@
 static void vc4_drm_unbind(struct device *dev) {
   struct drm_device *drm = dev_get_drvdata(dev);
   struct vc4_dev *vc4 = to_vc4_dev(drm);
   drm_dev_unregister(drm);
   drm_fb_cma_fbdev_fini(drm);
   drm_mode_config_cleanup(drm);
   drm_atomic_private_obj_fini(&vc4->ctm_manager);
-  drm_dev_unref(drm);
+  drm_dev_put(drm);
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,72 +1,72 @@
 static int armada_drm_bind(struct device *dev) {
   struct armada_private *priv;
   struct resource *mem = NULL;
   int ret, n;
   for (n = 0;; n++) {
     struct resource *r = platform_get_resource(to_platform_device(dev), IORESOURCE_MEM, n);
     if (!r) break;
     /* Resources above 64K are graphics memory */
     if (resource_size(r) > SZ_64K)
       mem = r;
     else
       return -EINVAL;
   }
   if (!mem) return -ENXIO;
   if (!devm_request_mem_region(dev, mem->start, resource_size(mem), "armada-drm")) return -EBUSY;
   priv = kzalloc(sizeof(*priv), GFP_KERNEL);
   if (!priv) return -ENOMEM;
   /*
    * The drm_device structure must be at the start of
    * armada_private for drm_dev_unref() to work correctly.
    */
   BUILD_BUG_ON(offsetof(struct armada_private, drm) != 0);
   ret = drm_dev_init(&priv->drm, &armada_drm_driver, dev);
   if (ret) {
     dev_err(dev, "[" DRM_NAME ":%s] drm_dev_init failed: %d\n", __func__, ret);
     kfree(priv);
     return ret;
   }
   priv->drm.dev_private = priv;
   dev_set_drvdata(dev, &priv->drm);
   INIT_WORK(&priv->fb_unref_work, armada_drm_unref_work);
   INIT_KFIFO(priv->fb_unref);
   /* Mode setting support */
   drm_mode_config_init(&priv->drm);
   priv->drm.mode_config.min_width = 320;
   priv->drm.mode_config.min_height = 200;
   /*
    * With vscale enabled, the maximum width is 1920 due to the
    * 1920 by 3 lines RAM
    */
   priv->drm.mode_config.max_width = 1920;
   priv->drm.mode_config.max_height = 2048;
   priv->drm.mode_config.preferred_depth = 24;
   priv->drm.mode_config.funcs = &armada_drm_mode_config_funcs;
   drm_mm_init(&priv->linear, mem->start, resource_size(mem));
   mutex_init(&priv->linear_lock);
   ret = component_bind_all(dev, &priv->drm);
   if (ret) goto err_kms;
   ret = drm_vblank_init(&priv->drm, priv->drm.mode_config.num_crtc);
   if (ret) goto err_comp;
   priv->drm.irq_enabled = true;
   ret = armada_fbdev_init(&priv->drm);
   if (ret) goto err_comp;
   drm_kms_helper_poll_init(&priv->drm);
   ret = drm_dev_register(&priv->drm, 0);
   if (ret) goto err_poll;
 #ifdef CONFIG_DEBUG_FS
   armada_drm_debugfs_init(priv->drm.primary);
 #endif
   return 0;
 err_poll:
   drm_kms_helper_poll_fini(&priv->drm);
   armada_fbdev_fini(&priv->drm);
 err_comp:
   component_unbind_all(dev, &priv->drm);
 err_kms:
   drm_mode_config_cleanup(&priv->drm);
   drm_mm_takedown(&priv->linear);
   flush_work(&priv->fb_unref_work);
-  drm_dev_unref(&priv->drm);
+  drm_dev_put(&priv->drm);
   return ret;
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)
--- initial
+++ final
@@ -1,12 +1,12 @@
 static void armada_drm_unbind(struct device *dev) {
   struct drm_device *drm = dev_get_drvdata(dev);
   struct armada_private *priv = drm->dev_private;
   drm_kms_helper_poll_fini(&priv->drm);
   armada_fbdev_fini(&priv->drm);
   drm_dev_unregister(&priv->drm);
   component_unbind_all(dev, &priv->drm);
   drm_mode_config_cleanup(&priv->drm);
   drm_mm_takedown(&priv->linear);
   flush_work(&priv->fb_unref_work);
-  drm_dev_unref(&priv->drm);
+  drm_dev_put(&priv->drm);
 }<sep>@@
expression e;
@@

-       drm_dev_unref
+       drm_dev_put
           (e)