drm/tegra: switch to drm_*_get(), drm_*_put() helpers
Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and drm_*_unreference() helpers. drm_*_reference() and drm_*_unreference() functions are just compatibility alias for drm_*_get() and drm_*_put() and should not be used by new code. So convert all users of compatibility functions to use the new APIs. Generated by: scripts/coccinelle/api/drm-get-put.cocci Signed-off-by: Cihangir Akturk <cakturk@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:

committed by
Thierry Reding

parent
788ff4b6cf
commit
7664b2fa42
@@ -304,7 +304,7 @@ host1x_bo_lookup(struct drm_file *file, u32 handle)
|
||||
if (!gem)
|
||||
return NULL;
|
||||
|
||||
drm_gem_object_unreference_unlocked(gem);
|
||||
drm_gem_object_put_unlocked(gem);
|
||||
|
||||
bo = to_tegra_bo(gem);
|
||||
return &bo->base;
|
||||
@@ -591,7 +591,7 @@ static int tegra_gem_mmap(struct drm_device *drm, void *data,
|
||||
|
||||
args->offset = drm_vma_node_offset_addr(&bo->gem.vma_node);
|
||||
|
||||
drm_gem_object_unreference_unlocked(gem);
|
||||
drm_gem_object_put_unlocked(gem);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -858,7 +858,7 @@ static int tegra_gem_set_tiling(struct drm_device *drm, void *data,
|
||||
bo->tiling.mode = mode;
|
||||
bo->tiling.value = value;
|
||||
|
||||
drm_gem_object_unreference_unlocked(gem);
|
||||
drm_gem_object_put_unlocked(gem);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -898,7 +898,7 @@ static int tegra_gem_get_tiling(struct drm_device *drm, void *data,
|
||||
break;
|
||||
}
|
||||
|
||||
drm_gem_object_unreference_unlocked(gem);
|
||||
drm_gem_object_put_unlocked(gem);
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -923,7 +923,7 @@ static int tegra_gem_set_flags(struct drm_device *drm, void *data,
|
||||
if (args->flags & DRM_TEGRA_GEM_BOTTOM_UP)
|
||||
bo->flags |= TEGRA_BO_BOTTOM_UP;
|
||||
|
||||
drm_gem_object_unreference_unlocked(gem);
|
||||
drm_gem_object_put_unlocked(gem);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -945,7 +945,7 @@ static int tegra_gem_get_flags(struct drm_device *drm, void *data,
|
||||
if (bo->flags & TEGRA_BO_BOTTOM_UP)
|
||||
args->flags |= DRM_TEGRA_GEM_BOTTOM_UP;
|
||||
|
||||
drm_gem_object_unreference_unlocked(gem);
|
||||
drm_gem_object_put_unlocked(gem);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user