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: Lucas Stach <l.stach@pengutronix.de>
Cc: Russell King <linux+etnaviv@armlinux.org.uk>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-18-emil.l.velikov@gmail.com
ret = etnaviv_gem_cpu_prep(obj, args->op, &args->timeout);
- drm_gem_object_put_unlocked(obj);
+ drm_gem_object_put(obj);
return ret;
}
ret = etnaviv_gem_cpu_fini(obj);
- drm_gem_object_put_unlocked(obj);
+ drm_gem_object_put(obj);
return ret;
}
return -ENOENT;
ret = etnaviv_gem_mmap_offset(obj, &args->offset);
- drm_gem_object_put_unlocked(obj);
+ drm_gem_object_put(obj);
return ret;
}
ret = etnaviv_gem_wait_bo(gpu, obj, timeout);
- drm_gem_object_put_unlocked(obj);
+ drm_gem_object_put(obj);
return ret;
}
mapping->use -= 1;
mutex_unlock(&etnaviv_obj->lock);
- drm_gem_object_put_unlocked(&etnaviv_obj->base);
+ drm_gem_object_put(&etnaviv_obj->base);
}
struct etnaviv_vram_mapping *etnaviv_gem_mapping_get(
/* drop reference from allocate - handle holds it now */
fail:
- drm_gem_object_put_unlocked(obj);
+ drm_gem_object_put(obj);
return ret;
}
ret = drm_gem_handle_create(file, &etnaviv_obj->base, handle);
/* drop reference from allocate - handle holds it now */
- drm_gem_object_put_unlocked(&etnaviv_obj->base);
+ drm_gem_object_put(&etnaviv_obj->base);
return ret;
}
return &etnaviv_obj->base;
fail:
- drm_gem_object_put_unlocked(&etnaviv_obj->base);
+ drm_gem_object_put(&etnaviv_obj->base);
return ERR_PTR(ret);
}
/* if the GPU submit failed, objects might still be locked */
submit_unlock_object(submit, i);
- drm_gem_object_put_unlocked(&etnaviv_obj->base);
+ drm_gem_object_put(&etnaviv_obj->base);
}
wake_up_all(&submit->gpu->fence_event);