diff options
-rw-r--r-- | drivers/gpu/vga/vga_switcheroo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index e01cacba685f..498b284e5ef9 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c | |||
@@ -219,9 +219,6 @@ static int vga_switchto_stage1(struct vga_switcheroo_client *new_client) | |||
219 | int i; | 219 | int i; |
220 | struct vga_switcheroo_client *active = NULL; | 220 | struct vga_switcheroo_client *active = NULL; |
221 | 221 | ||
222 | if (new_client->active == true) | ||
223 | return 0; | ||
224 | |||
225 | for (i = 0; i < VGA_SWITCHEROO_MAX_CLIENTS; i++) { | 222 | for (i = 0; i < VGA_SWITCHEROO_MAX_CLIENTS; i++) { |
226 | if (vgasr_priv.clients[i].active == true) { | 223 | if (vgasr_priv.clients[i].active == true) { |
227 | active = &vgasr_priv.clients[i]; | 224 | active = &vgasr_priv.clients[i]; |
@@ -372,6 +369,9 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf, | |||
372 | goto out; | 369 | goto out; |
373 | } | 370 | } |
374 | 371 | ||
372 | if (client->active == true) | ||
373 | goto out; | ||
374 | |||
375 | /* okay we want a switch - test if devices are willing to switch */ | 375 | /* okay we want a switch - test if devices are willing to switch */ |
376 | can_switch = true; | 376 | can_switch = true; |
377 | for (i = 0; i < VGA_SWITCHEROO_MAX_CLIENTS; i++) { | 377 | for (i = 0; i < VGA_SWITCHEROO_MAX_CLIENTS; i++) { |