[PATCH 15/17] drm/property_blob: Rename struct drm_property_blob::dev to drm

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Thu Jul 13 08:24:06 UTC 2023


"dev" is usually used for struct device pointers. Using it for struct
drm_device pointers is irritating (for me at least). Replace it
by "drm" and adapt all users.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
 drivers/gpu/drm/drm_property.c | 8 ++++----
 include/drm/drm_property.h     | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
index dfec479830e4..ab533c5b8cd4 100644
--- a/drivers/gpu/drm/drm_property.c
+++ b/drivers/gpu/drm/drm_property.c
@@ -528,11 +528,11 @@ static void drm_property_free_blob(struct kref *kref)
 	struct drm_property_blob *blob =
 		container_of(kref, struct drm_property_blob, base.refcount);
 
-	mutex_lock(&blob->dev->mode_config.blob_lock);
+	mutex_lock(&blob->drm->mode_config.blob_lock);
 	list_del(&blob->head_global);
-	mutex_unlock(&blob->dev->mode_config.blob_lock);
+	mutex_unlock(&blob->drm->mode_config.blob_lock);
 
-	drm_mode_object_unregister(blob->dev, &blob->base);
+	drm_mode_object_unregister(blob->drm, &blob->base);
 
 	kvfree(blob);
 }
@@ -570,7 +570,7 @@ drm_property_create_blob(struct drm_device *dev, size_t length,
 	INIT_LIST_HEAD(&blob->head_file);
 	blob->data = (void *)blob + sizeof(*blob);
 	blob->length = length;
-	blob->dev = dev;
+	blob->drm = dev;
 
 	if (data)
 		memcpy(blob->data, data, length);
diff --git a/include/drm/drm_property.h b/include/drm/drm_property.h
index 65bc9710a470..c6b570a8459e 100644
--- a/include/drm/drm_property.h
+++ b/include/drm/drm_property.h
@@ -200,7 +200,7 @@ struct drm_property {
 /**
  * struct drm_property_blob - Blob data for &drm_property
  * @base: base KMS object
- * @dev: DRM device
+ * @drm: DRM device
  * @head_global: entry on the global blob list in
  * 	&drm_mode_config.property_blob_list.
  * @head_file: entry on the per-file blob list in &drm_file.blobs list.
@@ -215,7 +215,7 @@ struct drm_property {
  */
 struct drm_property_blob {
 	struct drm_mode_object base;
-	struct drm_device *dev;
+	struct drm_device *drm;
 	struct list_head head_global;
 	struct list_head head_file;
 	size_t length;
-- 
2.39.2



More information about the dri-devel mailing list