drm/pagemap: Remove the drm_pagemap_create() interface

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
This commit is contained in:
Thomas Hellström 2025-12-19 12:33:05 +01:00
parent 8a52f4d9b1
commit 33ac8d150a

View 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.