]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/pagemap: Remove the drm_pagemap_create() interface
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 19 Dec 2025 11:33:05 +0000 (12:33 +0100)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Tue, 23 Dec 2025 09:00:47 +0000 (10:00 +0100)
With the drm_pagemap_init() interface, drm_pagemap_create() is not
used anymore.

v2:
- Slightly more verbose commit message. (Matt Brost)

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> # For merging through drm-xe.
Link: https://patch.msgid.link/20251219113320.183860-10-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/drm_pagemap.c

index 9b3a061fc6e8e67a18e576adc2b00d8c42ab7a57..5dd9fd30dc7f53d91fa8d1962ecb863de6982ce3 100644 (file)
@@ -686,36 +686,6 @@ int drm_pagemap_init(struct drm_pagemap *dpagemap,
 }
 EXPORT_SYMBOL(drm_pagemap_init);
 
-/**
- * drm_pagemap_create() - Create a struct drm_pagemap.
- * @drm: Pointer to a struct drm_device providing the device-private memory.
- * @pagemap: Pointer to a pre-setup struct dev_pagemap providing the struct pages.
- * @ops: Pointer to the struct drm_pagemap_ops.
- *
- * Allocate and initialize a struct drm_pagemap.
- *
- * Return: A refcounted pointer to a struct drm_pagemap on success.
- * Error pointer on error.
- */
-struct drm_pagemap *
-drm_pagemap_create(struct drm_device *drm,
-                  struct dev_pagemap *pagemap,
-                  const struct drm_pagemap_ops *ops)
-{
-       struct drm_pagemap *dpagemap = kzalloc(sizeof(*dpagemap), GFP_KERNEL);
-       int err;
-
-       if (!dpagemap)
-               return ERR_PTR(-ENOMEM);
-
-       err = drm_pagemap_init(dpagemap, pagemap, drm, ops);
-       if (err)
-               return ERR_PTR(err);
-
-       return dpagemap;
-}
-EXPORT_SYMBOL(drm_pagemap_create);
-
 /**
  * drm_pagemap_put() - Put a struct drm_pagemap reference
  * @dpagemap: Pointer to a struct drm_pagemap object.