From patchwork Sat Dec 22 09:07:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 10741403 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E9CB813AD for ; Sat, 22 Dec 2018 17:48:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21A4B1FFDB for ; Sat, 22 Dec 2018 17:48:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 112C02000A; Sat, 22 Dec 2018 17:48:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5F7E1FFDB for ; Sat, 22 Dec 2018 17:48:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388479AbeLVRsg (ORCPT ); Sat, 22 Dec 2018 12:48:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:34174 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389667AbeLVRrO (ORCPT ); Sat, 22 Dec 2018 12:47:14 -0500 Received: from sinanubuntu1604.mkjiurmyylmellclgttazegk5f.bx.internal.cloudapp.net (unknown [40.76.9.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 65B65219B5; Sat, 22 Dec 2018 09:07:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545469651; bh=rIbHg3p3DF2nNZFj9rexTMlc6QSq0pUNWbcn41uRH24=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J9StYQR7VmCV18tL1fjR+w4TL84O6+r8h+Y4RSO7nLEXi/+4qI0SOHJXewul4i2aA /WefWziVKCfTwzEZKRxUDETr1qL+wZcDdbxfIhvnShf4wALwFm7xqmfhacN8uw1nfp B3pCKEuUXrkHq4PWYDra5RZz8i8yjFs6vP3fgqig= From: Sinan Kaya To: linux-next@vger.kernel.org Cc: linux-acpi@vger.kernel.org, Sinan Kaya , Zha Qipeng , Darren Hart , Andy Shevchenko , platform-driver-x86@vger.kernel.org (open list:INTEL PMC/P-Unit IPC DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 05/11] platform/x86: intel_pmc: Hide PCI specific pieces behind CONFIG_PCI Date: Sat, 22 Dec 2018 09:07:14 +0000 Message-Id: <20181222090720.19234-6-okaya@kernel.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181222090720.19234-1-okaya@kernel.org> References: <20181222090720.19234-1-okaya@kernel.org> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In the configuration where CONFIG_PCI is unset, this driver is failing to compile due to PCI framework dependencies. Hide these behind CONFIG_PCI ifdef. Signed-off-by: Sinan Kaya --- drivers/platform/x86/intel_pmc_ipc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c index 7964ba22ef8d..d85dfed3bf9c 100644 --- a/drivers/platform/x86/intel_pmc_ipc.c +++ b/drivers/platform/x86/intel_pmc_ipc.c @@ -504,6 +504,7 @@ static irqreturn_t ioc(int irq, void *dev_id) return IRQ_HANDLED; } +#ifdef CONFIG_PCI static int ipc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) { struct intel_pmc_ipc_dev *pmc = &ipcdev; @@ -556,6 +557,7 @@ static struct pci_driver ipc_pci_driver = { .id_table = ipc_pci_ids, .probe = ipc_pci_probe, }; +#endif static ssize_t intel_pmc_ipc_simple_cmd_store(struct device *dev, struct device_attribute *attr, @@ -1007,18 +1009,22 @@ static int __init intel_pmc_ipc_init(void) pr_err("Failed to register PMC ipc platform driver\n"); return ret; } +#ifdef CONFIG_PCI ret = pci_register_driver(&ipc_pci_driver); if (ret) { pr_err("Failed to register PMC ipc pci driver\n"); platform_driver_unregister(&ipc_plat_driver); return ret; } +#endif return ret; } static void __exit intel_pmc_ipc_exit(void) { +#ifdef CONFIG_PCI pci_unregister_driver(&ipc_pci_driver); +#endif platform_driver_unregister(&ipc_plat_driver); }