drm/prime: make drm_prime_lookup_buf_handle static
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 14 Aug 2013 22:02:48 +0000 (00:02 +0200)
committerDave Airlie <airlied@redhat.com>
Wed, 21 Aug 2013 03:00:31 +0000 (13:00 +1000)
... and move it to the top of the function to avoid a forward
declaration.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_prime.c
include/drm/drmP.h

index 5e543e9264d72dbbde8d3d89a7d1b9cffe7551b3..ed1ea5c1a9cab5ec491bf1473b109ee20ac15190 100644 (file)
@@ -83,6 +83,21 @@ static int drm_prime_add_buf_handle(struct drm_prime_file_private *prime_fpriv,
        return 0;
 }
 
+static int drm_prime_lookup_buf_handle(struct drm_prime_file_private *prime_fpriv,
+                                      struct dma_buf *dma_buf,
+                                      uint32_t *handle)
+{
+       struct drm_prime_member *member;
+
+       list_for_each_entry(member, &prime_fpriv->head, entry) {
+               if (member->dma_buf == dma_buf) {
+                       *handle = member->handle;
+                       return 0;
+               }
+       }
+       return -ENOENT;
+}
+
 static int drm_gem_map_attach(struct dma_buf *dma_buf,
                              struct device *target_dev,
                              struct dma_buf_attachment *attach)
@@ -655,20 +670,6 @@ void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv)
 }
 EXPORT_SYMBOL(drm_prime_destroy_file_private);
 
-int drm_prime_lookup_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf, uint32_t *handle)
-{
-       struct drm_prime_member *member;
-
-       list_for_each_entry(member, &prime_fpriv->head, entry) {
-               if (member->dma_buf == dma_buf) {
-                       *handle = member->handle;
-                       return 0;
-               }
-       }
-       return -ENOENT;
-}
-EXPORT_SYMBOL(drm_prime_lookup_buf_handle);
-
 void drm_prime_remove_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf)
 {
        mutex_lock(&prime_fpriv->lock);
index ce1e6bd303061f5839e50a220c1d3a259358f809..5914cc5c3fa64d50331ca30188ecdc5492ad3ff8 100644 (file)
@@ -1508,7 +1508,6 @@ int drm_gem_dumb_destroy(struct drm_file *file,
 
 void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv);
 void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv);
-int drm_prime_lookup_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf, uint32_t *handle);
 void drm_prime_remove_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf);
 
 #if DRM_DEBUG_CODE