diff options
author | Seth Forshee <seth.forshee@canonical.com> | 2012-08-17 12:17:02 -0400 |
---|---|---|
committer | Matthew Garrett <mjg@redhat.com> | 2012-08-17 17:34:41 -0400 |
commit | e99eac5e4ea3bd8671bb1cedad10c3fec90ec0de (patch) | |
tree | 57349142cbcc796ef2ff758e5cf2b42f15103835 /drivers/gpu/vga/vga_switcheroo.c | |
parent | 36704c0c4c64f889d77158d497f6a7e596d1341c (diff) |
vga_switcheroo: Don't require handler init callback
This callback is a no-op in nouveau, and the upcoming apple-gmux
switcheroo support won't require it either. Rather than forcing drivers
to stub it out, just make it optional and remove the callback from
nouveau.
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/gpu/vga/vga_switcheroo.c')
-rw-r--r-- | drivers/gpu/vga/vga_switcheroo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index e10ba3755dfa..e25cf31faab2 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c | |||
@@ -83,7 +83,8 @@ static void vga_switcheroo_enable(void) | |||
83 | struct vga_switcheroo_client *client; | 83 | struct vga_switcheroo_client *client; |
84 | 84 | ||
85 | /* call the handler to init */ | 85 | /* call the handler to init */ |
86 | vgasr_priv.handler->init(); | 86 | if (vgasr_priv.handler->init) |
87 | vgasr_priv.handler->init(); | ||
87 | 88 | ||
88 | list_for_each_entry(client, &vgasr_priv.clients, list) { | 89 | list_for_each_entry(client, &vgasr_priv.clients, list) { |
89 | if (client->id != -1) | 90 | if (client->id != -1) |