Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2527703imu; Sun, 23 Dec 2018 01:40:32 -0800 (PST) X-Google-Smtp-Source: AFSGD/UWOeoC5awbB67bi2559r2wSpOYMJB9A1VASyWFU1uWRYiW2rHuD38PF2citTzRIoIuN/QB X-Received: by 2002:a62:29c3:: with SMTP id p186mr9342489pfp.117.1545558032618; Sun, 23 Dec 2018 01:40:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545558032; cv=none; d=google.com; s=arc-20160816; b=zDyhQqqysJwXZ87lr0Hzis4SJBJuWUMoX1i0/Fq7SWQOYrRd5gibC2NXcauzllqulC eL3sKzNf8cLfsiX8g/Qy1exdMlnDBjLw75GpPQYT7wpKxwQ6ls5LTAf9x2hk9KFyof81 pUl3e3CP7txdvj1KzxE2CWfYGHLToSq3vSx9a4Yays8Nf5PmBXUP8zg3/qDTKXwzRQv+ QgZQcRq3pt19RFWAipF+iU4ZkA03bvuQaXmPB0it3S9f6LmER/GHoia7eD5g2Q+CcgvI nlv2YQvJ8k+7DzoGgNseKPC6350uuL0LOHVKIjbyOa0Qs8CNdMuNUKVppOUxFYhw1vPV FVFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=e71Dq1JkB0yh7uy8wAKS7D8qWLKnOWgWOStXFaw5QZY=; b=CDnIXGyWlx8NomhhmtnxnmOOzqsQFMhANoNw0XqpIEyR3hey9UGsInBNSm89uxkARt xDMKjG2pkirfK9Dft/OBs9uyqpLlw4pY5lRjxjO0NUhrIv6F83pq9UZ7SMnbNJjqSxi6 rumdsmGCBt0Zo8IBPkvMhsvCUdc4JjCNAzo8/JiEgT/Jch4ujc7gLYw/qo57s+I8gBWl Gs3FrA34Lno/CKl8XC/qnJPBpSzRSZQDdiCg9stByAbFd1smbp5HYm1zveXhtn9/+uNL 0OIajpN+dtN6fDMxuelSp/72MfvODRGhp+0NYoJ7N01rEbS4IM6FittfS7C+WOUg7qUx 2kRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="l/i+qiwg"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1si24240439pgy.174.2018.12.23.01.40.17; Sun, 23 Dec 2018 01:40:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="l/i+qiwg"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404752AbeLVAPT (ORCPT + 99 others); Fri, 21 Dec 2018 19:15:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:45176 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404708AbeLVAPF (ORCPT ); Fri, 21 Dec 2018 19:15:05 -0500 Received: from sinanubuntu1604.mkjiurmyylmellclgttazegk5f.bx.internal.cloudapp.net (unknown [13.82.132.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 986E22192C; Sat, 22 Dec 2018 00:15:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545437705; bh=siwv04tjtdXgeL0jqAUW7KsgdPS12qH9eR/hz9p9Do8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l/i+qiwg5K6yJXyURTdIqeptHypAxui//XGO8N6rE8/epZOsZdP3wz2IrbdowttXD dKLrGcTVCCTkdg8HsQG1xjRHbM70y/lzFTNG3I4bMvwz5U7LJprICZOYQEd1jjD/Pt re3p5av7X8whOviPO+Ur3bKqvxpOE4X7OD7Dpb58= From: Sinan Kaya To: linux-next@vger.kernel.org Cc: linux-acpi@vger.kernel.org, Sinan Kaya , Darren Hart , Andy Shevchenko , platform-driver-x86@vger.kernel.org (open list:X86 PLATFORM DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v1 06/11] platform/x86: apple-gmux: hide PCI specific code Date: Sat, 22 Dec 2018 00:14:47 +0000 Message-Id: <20181222001452.7474-7-okaya@kernel.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181222001452.7474-1-okaya@kernel.org> References: <20181222001452.7474-1-okaya@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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