From patchwork Sat Dec 22 00:14:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 10741181 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 04F75746 for ; Sat, 22 Dec 2018 00:16:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB20328845 for ; Sat, 22 Dec 2018 00:16:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF2372885F; Sat, 22 Dec 2018 00:16:04 +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=unavailable 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 A9BAB28845 for ; Sat, 22 Dec 2018 00:16:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404726AbeLVAP5 (ORCPT ); Fri, 21 Dec 2018 19:15:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:45268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404721AbeLVAPJ (ORCPT ); Fri, 21 Dec 2018 19:15:09 -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 1D40E21934; Sat, 22 Dec 2018 00:15:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545437708; bh=mZfC7GdI6ibYlIxeNHfjh2ZpL23ahqOeMNCfr5RjwJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m3gpESN5YnYO3m6N33Dsr7CLGTnLaezkw6Q/PixHZjFIn2Hh8UENo/OH0hbcMg0XU eRuzChBZmmTQkj+/rc6FyUhfCDqv53JnTmP9xNbw4mgtQVHblA7HnbizzyJ2Tsrugj StoZdjR8/ihoHk8nS7MuHfMhq7ocVqbx2VequL4k= From: Sinan Kaya To: linux-next@vger.kernel.org Cc: linux-acpi@vger.kernel.org, Sinan Kaya , Zhang Rui , Eduardo Valentin , Daniel Lezcano , Sumeet Pawnikar , Amit Kucheria , linux-pm@vger.kernel.org (open list:THERMAL), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v1 07/11] drivers: thermal: Hide PCI driver when CONFIG_PCI is unset Date: Sat, 22 Dec 2018 00:14:48 +0000 Message-Id: <20181222001452.7474-8-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 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 This driver is both a platform and PCI driver. Hide PCI specific pieces when CONFIG_PCI is unset. Signed-off-by: Sinan Kaya --- .../intel/int340x_thermal/processor_thermal_device.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c index 284cf2c5a8fd..b84a475a1162 100644 --- a/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c +++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_device.c @@ -374,6 +374,7 @@ static int int3401_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PCI static irqreturn_t proc_thermal_pci_msi_irq(int irq, void *devid) { struct proc_thermal_device *proc_priv; @@ -482,6 +483,7 @@ static struct pci_driver proc_thermal_pci_driver = { .remove = proc_thermal_pci_remove, .id_table = proc_thermal_pci_ids, }; +#endif static const struct acpi_device_id int3401_device_ids[] = { {"INT3401", 0}, @@ -505,16 +507,18 @@ static int __init proc_thermal_init(void) ret = platform_driver_register(&int3401_driver); if (ret) return ret; - +#ifdef CONFIG_PCI ret = pci_register_driver(&proc_thermal_pci_driver); - +#endif return ret; } static void __exit proc_thermal_exit(void) { platform_driver_unregister(&int3401_driver); +#ifdef CONFIG_PCI pci_unregister_driver(&proc_thermal_pci_driver); +#endif } module_init(proc_thermal_init);