]> git.baikalelectronics.ru Git - kernel.git/commit
vga_switcheroo: don't toggle-switch devices
authorFlorian Mickler <florian@mickler.org>
Sun, 15 May 2011 14:32:50 +0000 (16:32 +0200)
committerDave Airlie <airlied@redhat.com>
Sun, 15 May 2011 22:57:04 +0000 (08:57 +1000)
commit3742d1b40438ef1742a257b5a50fc5da59b0759b
tree87ad4a1f9f2b5fd48d820949c827fea7264fa885
parentd6219f7a2f72b95f4fc3c76e37608c4301361da4
vga_switcheroo: don't toggle-switch devices

If the requested device is already active, ignore the request.

This restores the original behaviour of the interface. The change was
probably an unintended side effect of

commit c8577eb50b4a vga_switcheroo: split switching into two stages

which did not take into account to duplicate the !active check in the split-off
stage2.

Fix this by factoring that check out of stage1 into the debugfs_write routine.

References: https://bugzilla.kernel.org/show_bug.cgi?id=34252
Reported-by: Igor Murzov <e-mail@date.by>
Tested-by: Igor Murzov <e-mail@date.by>
Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/vga/vga_switcheroo.c