From 3f979e20c4e49b356548c7df8f76a12305373ae3 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 2 Dec 2020 15:52:46 +1000 Subject: [PATCH] drm/nouveau/subdev: remove nvkm_subdev.mutex There's not really any nice way to assign the lock classes when we split subdev indices into type+inst, and saves a few bytes in the structs when a subdev has no need for it. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul --- drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h | 1 - drivers/gpu/drm/nouveau/nvkm/core/subdev.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h b/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h index 76288c682e9ea..f927eaee094e2 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h @@ -7,7 +7,6 @@ struct nvkm_subdev { const struct nvkm_subdev_func *func; struct nvkm_device *device; enum nvkm_devidx index; - struct mutex mutex; u32 debug; bool oneinit; diff --git a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c index 49d468b45d3f4..5da6c920a9966 100644 --- a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c +++ b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c @@ -26,8 +26,6 @@ #include #include -static struct lock_class_key nvkm_subdev_lock_class[NVKM_SUBDEV_NR]; - const char * nvkm_subdev_name[NVKM_SUBDEV_NR] = { [NVKM_SUBDEV_ACR ] = "acr", @@ -217,8 +215,6 @@ nvkm_subdev_ctor(const struct nvkm_subdev_func *func, subdev->func = func; subdev->device = device; subdev->index = index; - - __mutex_init(&subdev->mutex, name, &nvkm_subdev_lock_class[index]); subdev->debug = nvkm_dbgopt(device->dbgopt, name); } -- 2.39.5