]> git.baikalelectronics.ru Git - kernel.git/commit
vga_switcheroo: Remove assumptions about registration/unregistration ordering
authorSeth Forshee <seth.forshee@canonical.com>
Fri, 17 Aug 2012 16:17:03 +0000 (11:17 -0500)
committerMatthew Garrett <mjg@redhat.com>
Fri, 17 Aug 2012 21:34:41 +0000 (17:34 -0400)
commit84572e3267f77d4bd32f81f840128c72946728aa
tree540dbed65a418bb599a729a17aa8cc806a1042af
parent88349aff88a9a57cdde63d5167cb5d3700f4d8fe
vga_switcheroo: Remove assumptions about registration/unregistration ordering

vga_switcheroo assumes that the handler will be registered before the
last client, otherwise switching will not be enabled. Likewise it's
assumed that the handler will not be unregistered without at least one
client also being unregistered, otherwise switching will remain enabled
despite no longer having a handler. These assumptions cannot be enforced
if the handler is in a separate driver from both clients, as with the
gmux found in Apple laptops. Remove this assumption.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/gpu/vga/vga_switcheroo.c