Commit b8912e29 authored by Emil Velikov's avatar Emil Velikov Committed by Emil Velikov

drm/tegra: remove _unlocked suffix in drm_gem_object_put_unlocked

Spelling out _unlocked for each and every driver is a annoying.
Especially if we consider how many drivers, do not know (or need to)
about the horror stories involving struct_mutex.

Just drop the suffix. It makes the API cleaner.

Done via the following script:

__from=drm_gem_object_put_unlocked
__to=drm_gem_object_put
for __file in $(git grep --name-only $__from); do
  sed -i  "s/$__from/$__to/g" $__file;
done

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Acked-by: default avatarThierry Reding <treding@nvidia.com>
Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-32-emil.l.velikov@gmail.com
parent b430fe08
...@@ -328,7 +328,7 @@ int tegra_drm_submit(struct tegra_drm_context *context, ...@@ -328,7 +328,7 @@ int tegra_drm_submit(struct tegra_drm_context *context,
fail: fail:
while (num_refs--) while (num_refs--)
drm_gem_object_put_unlocked(refs[num_refs]); drm_gem_object_put(refs[num_refs]);
kfree(refs); kfree(refs);
...@@ -368,7 +368,7 @@ static int tegra_gem_mmap(struct drm_device *drm, void *data, ...@@ -368,7 +368,7 @@ static int tegra_gem_mmap(struct drm_device *drm, void *data,
args->offset = drm_vma_node_offset_addr(&bo->gem.vma_node); args->offset = drm_vma_node_offset_addr(&bo->gem.vma_node);
drm_gem_object_put_unlocked(gem); drm_gem_object_put(gem);
return 0; return 0;
} }
...@@ -636,7 +636,7 @@ static int tegra_gem_set_tiling(struct drm_device *drm, void *data, ...@@ -636,7 +636,7 @@ static int tegra_gem_set_tiling(struct drm_device *drm, void *data,
bo->tiling.mode = mode; bo->tiling.mode = mode;
bo->tiling.value = value; bo->tiling.value = value;
drm_gem_object_put_unlocked(gem); drm_gem_object_put(gem);
return 0; return 0;
} }
...@@ -676,7 +676,7 @@ static int tegra_gem_get_tiling(struct drm_device *drm, void *data, ...@@ -676,7 +676,7 @@ static int tegra_gem_get_tiling(struct drm_device *drm, void *data,
break; break;
} }
drm_gem_object_put_unlocked(gem); drm_gem_object_put(gem);
return err; return err;
} }
...@@ -701,7 +701,7 @@ static int tegra_gem_set_flags(struct drm_device *drm, void *data, ...@@ -701,7 +701,7 @@ static int tegra_gem_set_flags(struct drm_device *drm, void *data,
if (args->flags & DRM_TEGRA_GEM_BOTTOM_UP) if (args->flags & DRM_TEGRA_GEM_BOTTOM_UP)
bo->flags |= TEGRA_BO_BOTTOM_UP; bo->flags |= TEGRA_BO_BOTTOM_UP;
drm_gem_object_put_unlocked(gem); drm_gem_object_put(gem);
return 0; return 0;
} }
...@@ -723,7 +723,7 @@ static int tegra_gem_get_flags(struct drm_device *drm, void *data, ...@@ -723,7 +723,7 @@ static int tegra_gem_get_flags(struct drm_device *drm, void *data,
if (bo->flags & TEGRA_BO_BOTTOM_UP) if (bo->flags & TEGRA_BO_BOTTOM_UP)
args->flags |= DRM_TEGRA_GEM_BOTTOM_UP; args->flags |= DRM_TEGRA_GEM_BOTTOM_UP;
drm_gem_object_put_unlocked(gem); drm_gem_object_put(gem);
return 0; return 0;
} }
......
...@@ -171,7 +171,7 @@ struct drm_framebuffer *tegra_fb_create(struct drm_device *drm, ...@@ -171,7 +171,7 @@ struct drm_framebuffer *tegra_fb_create(struct drm_device *drm,
unreference: unreference:
while (i--) while (i--)
drm_gem_object_put_unlocked(&planes[i]->gem); drm_gem_object_put(&planes[i]->gem);
return ERR_PTR(err); return ERR_PTR(err);
} }
...@@ -235,7 +235,7 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper, ...@@ -235,7 +235,7 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,
info = drm_fb_helper_alloc_fbi(helper); info = drm_fb_helper_alloc_fbi(helper);
if (IS_ERR(info)) { if (IS_ERR(info)) {
dev_err(drm->dev, "failed to allocate framebuffer info\n"); dev_err(drm->dev, "failed to allocate framebuffer info\n");
drm_gem_object_put_unlocked(&bo->gem); drm_gem_object_put(&bo->gem);
return PTR_ERR(info); return PTR_ERR(info);
} }
...@@ -244,7 +244,7 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper, ...@@ -244,7 +244,7 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,
err = PTR_ERR(fbdev->fb); err = PTR_ERR(fbdev->fb);
dev_err(drm->dev, "failed to allocate DRM framebuffer: %d\n", dev_err(drm->dev, "failed to allocate DRM framebuffer: %d\n",
err); err);
drm_gem_object_put_unlocked(&bo->gem); drm_gem_object_put(&bo->gem);
return PTR_ERR(fbdev->fb); return PTR_ERR(fbdev->fb);
} }
......
...@@ -24,7 +24,7 @@ static void tegra_bo_put(struct host1x_bo *bo) ...@@ -24,7 +24,7 @@ static void tegra_bo_put(struct host1x_bo *bo)
{ {
struct tegra_bo *obj = host1x_to_tegra_bo(bo); struct tegra_bo *obj = host1x_to_tegra_bo(bo);
drm_gem_object_put_unlocked(&obj->gem); drm_gem_object_put(&obj->gem);
} }
/* XXX move this into lib/scatterlist.c? */ /* XXX move this into lib/scatterlist.c? */
...@@ -385,7 +385,7 @@ struct tegra_bo *tegra_bo_create_with_handle(struct drm_file *file, ...@@ -385,7 +385,7 @@ struct tegra_bo *tegra_bo_create_with_handle(struct drm_file *file,
return ERR_PTR(err); return ERR_PTR(err);
} }
drm_gem_object_put_unlocked(&bo->gem); drm_gem_object_put(&bo->gem);
return bo; return bo;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment