drm/prime: Align gem_prime_export with obj_funcs.export

The idea is that gem_prime_export is deprecated in favor of
obj_funcs.export. That's much easier to do if both have matching
function signatures.

Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Acked-by: Christian König <[email protected]>
Acked-by: Thierry Reding <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Cc: Russell King <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Zhenyu Wang <[email protected]>
Cc: Zhi Wang <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: "David (ChunMing) Zhou" <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Jonathan Hunter <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Eric Anholt <[email protected]>
Cc: "Michel Dänzer" <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: Huang Rui <[email protected]>
Cc: Felix Kuehling <[email protected]>
Cc: Hawking Zhang <[email protected]>
Cc: Feifei Xu <[email protected]>
Cc: Jim Qu <[email protected]>
Cc: Evan Quan <[email protected]>
Cc: Matthew Auld <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: Kate Stewart <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: Jilayne Lovejoy <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Mikulas Patocka <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Junwei Zhang <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
index 1f100d5..30377b5 100644
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -384,9 +384,9 @@ static struct dma_buf *export_and_register_object(struct drm_device *dev,
 	if (obj->funcs && obj->funcs->export)
 		dmabuf = obj->funcs->export(obj, flags);
 	else if (dev->driver->gem_prime_export)
-		dmabuf = dev->driver->gem_prime_export(dev, obj, flags);
+		dmabuf = dev->driver->gem_prime_export(obj, flags);
 	else
-		dmabuf = drm_gem_prime_export(dev, obj, flags);
+		dmabuf = drm_gem_prime_export(obj, flags);
 	if (IS_ERR(dmabuf)) {
 		/* normally the created dma-buf takes ownership of the ref,
 		 * but if that fails then drop the ref
@@ -814,7 +814,6 @@ EXPORT_SYMBOL(drm_prime_pages_to_sg);
 
 /**
  * drm_gem_prime_export - helper library implementation of the export callback
- * @dev: drm_device to export from
  * @obj: GEM object to export
  * @flags: flags like DRM_CLOEXEC and DRM_RDWR
  *
@@ -822,10 +821,10 @@ EXPORT_SYMBOL(drm_prime_pages_to_sg);
  * using the PRIME helpers. It is used as the default in
  * drm_gem_prime_handle_to_fd().
  */
-struct dma_buf *drm_gem_prime_export(struct drm_device *dev,
-				     struct drm_gem_object *obj,
+struct dma_buf *drm_gem_prime_export(struct drm_gem_object *obj,
 				     int flags)
 {
+	struct drm_device *dev = obj->dev;
 	struct dma_buf_export_info exp_info = {
 		.exp_name = KBUILD_MODNAME, /* white lie for debug */
 		.owner = dev->driver->fops->owner,