]> git.karo-electronics.de Git - karo-tx-linux.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:26:49 +0000 (17:26 -0400)
commitd28dc7e805e4fba9a6ac5e57162b50e379264628
tree7037f8bb19c6a3df7df1af40bfc5e44d191dccfc
parenteb65a1e6b0922653634778c877a616f1494c8ebf
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