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>
This commit is contained in:
committed by
Matthew Garrett
parent
36704c0c4c
commit
e99eac5e4e
@@ -83,7 +83,8 @@ static void vga_switcheroo_enable(void)
|
||||
struct vga_switcheroo_client *client;
|
||||
|
||||
/* call the handler to init */
|
||||
vgasr_priv.handler->init();
|
||||
if (vgasr_priv.handler->init)
|
||||
vgasr_priv.handler->init();
|
||||
|
||||
list_for_each_entry(client, &vgasr_priv.clients, list) {
|
||||
if (client->id != -1)
|
||||
|
||||
Reference in New Issue
Block a user