@@ -26,6 +26,8 @@ static struct vmw_thp_manager *to_thp_manager(struct ttm_resource_manager *man)
26
26
return container_of (man , struct vmw_thp_manager , manager );
27
27
}
28
28
29
+ static const struct ttm_resource_manager_func vmw_thp_func ;
30
+
29
31
static int vmw_thp_insert_aligned (struct drm_mm * mm , struct drm_mm_node * node ,
30
32
unsigned long align_pages ,
31
33
const struct ttm_place * place ,
@@ -132,6 +134,7 @@ int vmw_thp_init(struct vmw_private *dev_priv)
132
134
ttm_resource_manager_init (& rman -> manager ,
133
135
dev_priv -> vram_size >> PAGE_SHIFT );
134
136
137
+ rman -> manager .func = & vmw_thp_func ;
135
138
drm_mm_init (& rman -> mm , 0 , rman -> manager .size );
136
139
spin_lock_init (& rman -> lock );
137
140
@@ -171,7 +174,7 @@ static void vmw_thp_debug(struct ttm_resource_manager *man,
171
174
spin_unlock (& rman -> lock );
172
175
}
173
176
174
- const struct ttm_resource_manager_func vmw_thp_func = {
177
+ static const struct ttm_resource_manager_func vmw_thp_func = {
175
178
.alloc = vmw_thp_get_node ,
176
179
.free = vmw_thp_put_node ,
177
180
.debug = vmw_thp_debug
0 commit comments