tbm_module: remove the static variable
[platform/core/uifw/libtbm.git] / src / tbm_module.c
index 652713d..2f38521 100644 (file)
@@ -650,18 +650,16 @@ tbm_module_support_surface_data(tbm_module *module)
        tbm_error_e error = TBM_ERROR_NONE;
        tbm_surface_data *surface_data = NULL;
 
-       static int tbm_module_check_support_surface_data = 0;
-
        TBM_RETURN_VAL_IF_FAIL(module, 0);
 
        // check once support_surface_data or not.
-       if (tbm_module_check_support_surface_data) {
+       if (module->check_surface_data) {
                // return the value which already set.
                return module->support_surface_data;
        }
 
        // check this only once
-       tbm_module_check_support_surface_data = 1;
+       module->check_surface_data = 1;
 
        if (module->type != TBM_MODULE_TYPE_HAL_TBM)
                goto done;