From: Ben Skeggs Date: Wed, 2 Dec 2020 05:52:46 +0000 (+1000) Subject: drm/nouveau/subdev: remove nvkm_subdev.mutex X-Git-Tag: howlett/maple/20220722_2~3755^2~3^2~76 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=149a23b026699e5284d9f613ae971e7cadace201;p=users%2Fjedix%2Flinux-maple.git 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 --- diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h b/drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h index 76288c682e9e..f927eaee094e 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 49d468b45d3f..5da6c920a996 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); }