int registered_clients;
struct list_head clients;
- struct vga_switcheroo_handler *handler;
+ const struct vga_switcheroo_handler *handler;
};
#define ID_BIT_AUDIO 0x100
*
* Return: 0 on success, -EINVAL if a handler was already registered.
*/
-int vga_switcheroo_register_handler(struct vga_switcheroo_handler *handler)
+int vga_switcheroo_register_handler(const struct vga_switcheroo_handler *handler)
{
mutex_lock(&vgasr_mutex);
if (vgasr_priv.handler) {
client = find_client_from_pci(&vgasr_priv.clients, pdev);
if (!client)
ret = VGA_SWITCHEROO_NOT_FOUND;
- else if (!vgasr_priv.active)
- ret = VGA_SWITCHEROO_INIT;
else
ret = client->pwr_state;
mutex_unlock(&vgasr_mutex);