Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228825
b: refs/heads/master
c: 5cfb3c3
h: refs/heads/master
i:
  228823: 2fb44ed
v: v3
  • Loading branch information
Dave Airlie committed Jan 5, 2011
1 parent 3e0cc56 commit 2dd744b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c2df40ec00e52a5fb0c691b0e79324b9015aaa4
refs/heads/master: 5cfb3c3a1013e7fca54c3624871755cdfd960b3b
8 changes: 4 additions & 4 deletions trunk/drivers/gpu/vga/vga_switcheroo.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,8 @@ static int vga_switcheroo_debugfs_open(struct inode *inode, struct file *file)

static int vga_switchon(struct vga_switcheroo_client *client)
{
int ret;

ret = vgasr_priv.handler->power_state(client->id, VGA_SWITCHEROO_ON);
if (vgasr_priv.handler->power_state)
vgasr_priv.handler->power_state(client->id, VGA_SWITCHEROO_ON);
/* call the driver callback to turn on device */
client->set_gpu_state(client->pdev, VGA_SWITCHEROO_ON);
client->pwr_state = VGA_SWITCHEROO_ON;
Expand All @@ -204,7 +203,8 @@ static int vga_switchoff(struct vga_switcheroo_client *client)
{
/* call the driver callback to turn off device */
client->set_gpu_state(client->pdev, VGA_SWITCHEROO_OFF);
vgasr_priv.handler->power_state(client->id, VGA_SWITCHEROO_OFF);
if (vgasr_priv.handler->power_state)
vgasr_priv.handler->power_state(client->id, VGA_SWITCHEROO_OFF);
client->pwr_state = VGA_SWITCHEROO_OFF;
return 0;
}
Expand Down

0 comments on commit 2dd744b

Please sign in to comment.