vga_switcheroo: Introduce struct vga_switcheroo_client_ops
[deliverable/linux.git] / drivers / gpu / drm / nouveau / nouveau_state.c
index c2a8511e855a344d515afe9a3daba8c74736f2b5..298c09b755697f791c530fc541d559ad0465ca69 100644 (file)
@@ -662,6 +662,12 @@ error:
        return ret;
 }
 
+static const struct vga_switcheroo_client_ops nouveau_switcheroo_ops = {
+       .set_gpu_state = nouveau_switcheroo_set_state,
+       .reprobe = nouveau_switcheroo_reprobe,
+       .can_switch = nouveau_switcheroo_can_switch,
+};
+
 int
 nouveau_card_init(struct drm_device *dev)
 {
@@ -670,9 +676,7 @@ nouveau_card_init(struct drm_device *dev)
        int ret, e = 0;
 
        vga_client_register(dev->pdev, dev, NULL, nouveau_vga_set_decode);
-       vga_switcheroo_register_client(dev->pdev, nouveau_switcheroo_set_state,
-                                      nouveau_switcheroo_reprobe,
-                                      nouveau_switcheroo_can_switch);
+       vga_switcheroo_register_client(dev->pdev, &nouveau_switcheroo_ops);
 
        /* Initialise internal driver API hooks */
        ret = nouveau_init_engine_ptrs(dev);
This page took 0.024927 seconds and 5 git commands to generate.