tbm_bufmgr_sprd: change functions as static one 53/97453/2
authorYoungJun Cho <yj44.cho@samsung.com>
Mon, 14 Nov 2016 07:20:50 +0000 (16:20 +0900)
committerYoungJun Cho <yj44.cho@samsung.com>
Tue, 15 Nov 2016 02:15:07 +0000 (18:15 -0800)
This patch changes functions as static one.
- tbm_sprd_bo_export_fd()
- tbm_sprd_surface_supported_format()
- tbm_sprd_surface_get_plane_data()
- tbm_sprd_bo_get_flags()
- tbm_sprd_bufmgr_bind_native_display()

Change-Id: I4b67b9200434cb1950b16bb4b734ecec902696b9
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
src/tbm_bufmgr_sprd.c

index e8b84a0..81676b8 100644 (file)
@@ -1259,7 +1259,7 @@ tbm_sprd_bo_export(tbm_bo bo)
        return (unsigned int)bo_sprd->name;
 }
 
-tbm_fd
+static tbm_fd
 tbm_sprd_bo_export_fd(tbm_bo bo)
 {
        SPRD_RETURN_VAL_IF_FAIL(bo != NULL, -1);
@@ -1603,25 +1603,22 @@ tbm_sprd_bufmgr_deinit(void *priv)
        free(bufmgr_sprd);
 }
 
-int
+static int
 tbm_sprd_surface_supported_format(uint32_t **formats, uint32_t *num)
 {
-       uint32_t *color_formats = NULL;
+       uint32_t *color_formats;
 
        color_formats = (uint32_t *)calloc(1,
                                            sizeof(uint32_t) * TBM_COLOR_FORMAT_COUNT);
-
        if (color_formats == NULL)
                return 0;
 
        memcpy(color_formats, tbm_sprd_color_format_list,
                sizeof(uint32_t)*TBM_COLOR_FORMAT_COUNT);
 
-
        *formats = color_formats;
        *num = TBM_COLOR_FORMAT_COUNT;
 
-
        return 1;
 }
 
@@ -1638,7 +1635,7 @@ tbm_sprd_surface_supported_format(uint32_t **formats, uint32_t *num)
  * @param[out] padding : the padding of the plane
  * @return 1 if this function succeeds, otherwise 0.
  */
-int
+static int
 tbm_sprd_surface_get_plane_data(int width, int height,
                                tbm_format format, int plane_idx, uint32_t *size, uint32_t *offset,
                                uint32_t *pitch, int *bo_idx)
@@ -1879,7 +1876,7 @@ tbm_sprd_surface_get_plane_data(int width, int height,
        return ret;
 }
 
-int
+static int
 tbm_sprd_bo_get_flags(tbm_bo bo)
 {
        SPRD_RETURN_VAL_IF_FAIL(bo != NULL, 0);
@@ -1892,7 +1889,7 @@ tbm_sprd_bo_get_flags(tbm_bo bo)
        return bo_sprd->flags_tbm;
 }
 
-int
+static int
 tbm_sprd_bufmgr_bind_native_display(tbm_bufmgr bufmgr, void *NativeDisplay)
 {
        tbm_bufmgr_sprd bufmgr_sprd;