diff mbox

[1/2] vga_switcheroo: Remove unbalanced pci_enable_device

Message ID 20110502004928.2307.25274.stgit@ul30vt.home (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Williamson May 2, 2011, 12:49 a.m. UTC
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>
---

 drivers/gpu/vga/vga_switcheroo.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

Comments

Dave Airlie May 4, 2011, 3:49 a.m. UTC | #1
> This is unbalanced and probably more fitting for the client
> to take care of.  Remove it.

I've queued this in -next.

Dave.
diff mbox

Patch

diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
index e01cacb..f0f244d 100644
--- a/drivers/gpu/vga/vga_switcheroo.c
+++ b/drivers/gpu/vga/vga_switcheroo.c
@@ -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);