Skip to content

Commit

Permalink
drm/nouveau: Unregister switcheroo client on exit
Browse files Browse the repository at this point in the history
Currently nouveau only registers as a vga_switcheroo client, but never
unregisters. This patch adds the necessary unregister calls.

Signed-off-by: Andreas Heider <andreas@meetr.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Andreas Heider authored and Ben Skeggs committed May 24, 2012
1 parent 2f3787a commit 5c5ed6e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/nouveau/nouveau_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ nouveau_card_init(struct drm_device *dev)
out_display_early:
engine->display.late_takedown(dev);
out:
vga_switcheroo_unregister_client(dev->pdev);
vga_client_register(dev->pdev, NULL, NULL, NULL);
return ret;
}
Expand Down Expand Up @@ -895,6 +896,7 @@ static void nouveau_card_takedown(struct drm_device *dev)

nouveau_irq_fini(dev);

vga_switcheroo_unregister_client(dev->pdev);
vga_client_register(dev->pdev, NULL, NULL, NULL);
}

Expand Down

0 comments on commit 5c5ed6e

Please sign in to comment.