]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
platform/x86: apple-gmux: fix gmux_get_client_id()'s return type
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Tue, 24 Apr 2018 13:15:43 +0000 (15:15 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 24 Apr 2018 16:55:33 +0000 (19:55 +0300)
The method struct vga_switcheroo_handler::get_client_id() is defined
as returning an 'enum vga_switcheroo_client_id' but the implementation
in this driver, gmux_get_client_id(), returns an 'int'.

Fix this by returning 'enum vga_switcheroo_client_id' in this driver too.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/apple-gmux.c

index 7c4eb86c851ed9568cb882d32a9a5fdd3a0d13a0..fd2ffebc868fc7ed6ae2c55a899debbf1c5041bd 100644 (file)
@@ -495,7 +495,7 @@ static int gmux_set_power_state(enum vga_switcheroo_client_id id,
        return gmux_set_discrete_state(apple_gmux_data, state);
 }
 
-static int gmux_get_client_id(struct pci_dev *pdev)
+static enum vga_switcheroo_client_id gmux_get_client_id(struct pci_dev *pdev)
 {
        /*
         * Early Macbook Pros with switchable graphics use nvidia