vga_switcheroo: Remove unbalanced pci_enable_device
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 2 May 2011 00:49:33 +0000 (18:49 -0600)
committerDave Airlie <airlied@redhat.com>
Wed, 4 May 2011 03:46:01 +0000 (13:46 +1000)
This is unbalanced and probably more fitting for the client
to take care of.  Remove it.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/vga/vga_switcheroo.c

index e01cacba685f771f0f82a660b1e1bc21cd0b40e8..f0f244d2943849c1436bbcde741bc3390ebada61 100644 (file)
@@ -215,7 +215,6 @@ static int vga_switchoff(struct vga_switcheroo_client *client)
 /* stage one happens before delay */
 static int vga_switchto_stage1(struct vga_switcheroo_client *new_client)
 {
-       int ret;
        int i;
        struct vga_switcheroo_client *active = NULL;
 
@@ -231,11 +230,6 @@ static int vga_switchto_stage1(struct vga_switcheroo_client *new_client)
        if (!active)
                return 0;
 
-       /* power up the first device */
-       ret = pci_enable_device(new_client->pdev);
-       if (ret)
-               return ret;
-
        if (new_client->pwr_state == VGA_SWITCHEROO_OFF)
                vga_switchon(new_client);