diff options
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_acpi.c | 6 | ||||
-rw-r--r-- | drivers/gpu/vga/vga_switcheroo.c | 3 |
2 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index fc841e87b343..26ebffebe710 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c | |||
@@ -211,11 +211,6 @@ static int nouveau_dsm_power_state(enum vga_switcheroo_client_id id, | |||
211 | return nouveau_dsm_set_discrete_state(nouveau_dsm_priv.dhandle, state); | 211 | return nouveau_dsm_set_discrete_state(nouveau_dsm_priv.dhandle, state); |
212 | } | 212 | } |
213 | 213 | ||
214 | static int nouveau_dsm_init(void) | ||
215 | { | ||
216 | return 0; | ||
217 | } | ||
218 | |||
219 | static int nouveau_dsm_get_client_id(struct pci_dev *pdev) | 214 | static int nouveau_dsm_get_client_id(struct pci_dev *pdev) |
220 | { | 215 | { |
221 | /* easy option one - intel vendor ID means Integrated */ | 216 | /* easy option one - intel vendor ID means Integrated */ |
@@ -232,7 +227,6 @@ static int nouveau_dsm_get_client_id(struct pci_dev *pdev) | |||
232 | static struct vga_switcheroo_handler nouveau_dsm_handler = { | 227 | static struct vga_switcheroo_handler nouveau_dsm_handler = { |
233 | .switchto = nouveau_dsm_switchto, | 228 | .switchto = nouveau_dsm_switchto, |
234 | .power_state = nouveau_dsm_power_state, | 229 | .power_state = nouveau_dsm_power_state, |
235 | .init = nouveau_dsm_init, | ||
236 | .get_client_id = nouveau_dsm_get_client_id, | 230 | .get_client_id = nouveau_dsm_get_client_id, |
237 | }; | 231 | }; |
238 | 232 | ||
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) |