]> 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)
commite91016d7a64b79f659113024e07c75e023951218
tree540dbed65a418bb599a729a17aa8cc806a1042af
parentb021101d9853df60ea0c2aadf1619394bc5e8323
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