]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: Check dsm on switcheroo unregister
authorAndreas Heider <andreas@meetr.de>
Sun, 20 May 2012 23:14:50 +0000 (00:14 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 24 May 2012 06:56:34 +0000 (16:56 +1000)
commit2e8a093f531a86394a36f43a43a2182fab46ae5b
treeb0465658f2a4593eea40af2d1865917490b5d432
parent2467ab2c1cfee8485cd941b185aa0b3955a66350
drm/nouveau: Check dsm on switcheroo unregister

Currently vga_switcheroo_unregister_handler is called unconditionally when
nouveau is unloaded, even when nouveau never registered a handler. This
interferes with other switcheroo handlers, as vga_switcheroo doesn't check who
called unregister_handler, but simply unregisters the current handler. This
patch adds a check so unregister is only called if a handler was registered by
nouveau before.

Signed-off-by: Andreas Heider <andreas@meetr.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_acpi.c