blob: 9b9f53e45dcc7dd1e102c59025addc20c6608bcb [file] [log] [blame]
--- a/kernel/uvm/uvm_common.c
+++ b/kernel/uvm/uvm_common.c
@@ -95,7 +95,6 @@ static RM_STATUS uvmnext_gpu_event_stop_
#endif // NVIDIA_UVM_NEXT_ENABLED
static dev_t g_uvmBaseDev;
-struct UvmOpsUvmEvents g_exportedUvmOps;
// TODO: This would be easier if RM allowed for multiple registrations, since we
// could register UVM-Lite and UVM-Next separately (bug 1372835).
@@ -147,9 +146,11 @@ static RM_STATUS uvmSetupGpuProvider(voi
RM_STATUS status = RM_OK;
#ifdef NVIDIA_UVM_RM_ENABLED
- g_exportedUvmOps.startDevice = uvm_gpu_event_start_device;
- g_exportedUvmOps.stopDevice = uvm_gpu_event_stop_device;
- g_exportedUvmOps.isrTopHalf = uvmnext_isr_top_half;
+ static struct UvmOpsUvmEvents g_exportedUvmOps = {
+ .startDevice = uvm_gpu_event_start_device,
+ .stopDevice = uvm_gpu_event_stop_device,
+ .isrTopHalf = uvmnext_isr_top_half,
+ };
// call RM to exchange the function pointers.
status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps);