[Mesa-dev] [PATCH 01/34] gbm: Move getters to match order in header file (trivial)

Ben Widawsky ben at bwidawsk.net
Tue Jan 24 06:19:00 UTC 2017


Other things are out of order, but I need to add a getter so I'm just
fixing those.

This helps people adding to GBM know where the right place to put things
is.

Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
Acked-by: Daniel Stone <daniels at collabora.com>
---
 src/gbm/main/gbm.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c
index 9ef1990017..00113faab8 100644
--- a/src/gbm/main/gbm.c
+++ b/src/gbm/main/gbm.c
@@ -181,6 +181,17 @@ gbm_bo_get_format(struct gbm_bo *bo)
    return bo->format;
 }
 
+/** Get the gbm device used to create the buffer object
+ *
+ * \param bo The buffer object
+ * \return Returns the gbm device with which the buffer object was created
+ */
+GBM_EXPORT struct gbm_device *
+gbm_bo_get_device(struct gbm_bo *bo)
+{
+	return bo->gbm;
+}
+
 /** Get the handle of the buffer object
  *
  * This is stored in the platform generic union gbm_bo_handle type. However
@@ -232,17 +243,6 @@ gbm_bo_write(struct gbm_bo *bo, const void *buf, size_t count)
    return bo->gbm->bo_write(bo, buf, count);
 }
 
-/** Get the gbm device used to create the buffer object
- *
- * \param bo The buffer object
- * \return Returns the gbm device with which the buffer object was created
- */
-GBM_EXPORT struct gbm_device *
-gbm_bo_get_device(struct gbm_bo *bo)
-{
-	return bo->gbm;
-}
-
 /** Set the user data associated with a buffer object
  *
  * \param bo The buffer object
-- 
2.11.0



More information about the mesa-dev mailing list