[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181222001452.7474-7-okaya@kernel.org>
Date: Sat, 22 Dec 2018 00:14:47 +0000
From: Sinan Kaya <okaya@...nel.org>
To: linux-next@...r.kernel.org
Cc: linux-acpi@...r.kernel.org, Sinan Kaya <okaya@...nel.org>,
Darren Hart <dvhart@...radead.org>,
Andy Shevchenko <andy@...radead.org>,
platform-driver-x86@...r.kernel.org (open list:X86 PLATFORM DRIVERS),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH v1 06/11] platform/x86: apple-gmux: hide PCI specific code
Code is scanning PCI bus to find out if it is switchable or not. If
CONFIG_PCI is not set, assume unswitchable.
Signed-off-by: Sinan Kaya <okaya@...nel.org>
---
drivers/platform/x86/apple-gmux.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
index fd2ffebc868f..b552b54bf58b 100644
--- a/drivers/platform/x86/apple-gmux.c
+++ b/drivers/platform/x86/apple-gmux.c
@@ -742,8 +742,12 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
* If Thunderbolt is present, the external DP port is not fully
* switchable. Force its AUX channel to the discrete GPU.
*/
+#ifdef CONFIG_PCI
gmux_data->external_switchable =
!bus_for_each_dev(&pci_bus_type, NULL, NULL, is_thunderbolt);
+#else
+ gmux_data->external_switchable = false;
+#endif
if (!gmux_data->external_switchable)
gmux_write8(gmux_data, GMUX_PORT_SWITCH_EXTERNAL, 3);
--
2.19.0
Powered by blists - more mailing lists