diff mbox series

[SRU,Bionic,OEM-B,v2,6/6] platform/x86: apple-gmux: fix gmux_get_client_id()'s return type

Message ID 1532914344-7055-7-git-send-email-hui.wang@canonical.com
State Accepted
Headers show
Series HDMI/DP audio can't work on the laptop of Dell Latitude 5495 | expand

Commit Message

Hui Wang July 30, 2018, 1:32 a.m. UTC
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>

BugLink: http://bugs.launchpad.net/bugs/1782689

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>
(cherry picked from commit 19e752052b9dd5b1ab901f1982b5d2ae7c188ca2)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
---
 drivers/platform/x86/apple-gmux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
index 7c4eb86..fd2ffeb 100644
--- a/drivers/platform/x86/apple-gmux.c
+++ b/drivers/platform/x86/apple-gmux.c
@@ -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