From: Sinan Kaya <okaya@kernel.org>
To: linux-next@vger.kernel.org
Cc: linux-acpi@vger.kernel.org, Sinan Kaya <okaya@kernel.org>,
Zha Qipeng <qipeng.zha@intel.com>,
Darren Hart <dvhart@infradead.org>,
Andy Shevchenko <andy@infradead.org>,
"open list:INTEL PMC/P-Unit IPC DRIVER"
<platform-driver-x86@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: [PATCH v1 05/11] platform/x86: intel_pmc: Hide PCI specific pieces behind CONFIG_PCI
Date: Sat, 22 Dec 2018 00:14:46 +0000 [thread overview]
Message-ID: <20181222001452.7474-6-okaya@kernel.org> (raw)
In-Reply-To: <20181222001452.7474-1-okaya@kernel.org>
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 <okaya@kernel.org>
---
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);
}
--
2.19.0
next prev parent reply other threads:[~2018-12-22 0:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181222001452.7474-1-okaya@kernel.org>
2018-12-22 0:14 ` [PATCH v1 01/11] ACPI / LPSS: Add guards against CONFIG_PCI Sinan Kaya
2018-12-22 0:14 ` [PATCH v1 02/11] ata: make PCI dependency explicit for PATA_ACPI Sinan Kaya
2018-12-22 0:14 ` [PATCH v1 03/11] vga-switcheroo: make PCI dependency explicit Sinan Kaya
2018-12-22 7:51 ` Lukas Wunner
2018-12-22 0:14 ` [PATCH v1 04/11] platform/x86: " Sinan Kaya
2018-12-22 0:14 ` Sinan Kaya [this message]
2018-12-22 0:14 ` [PATCH v1 06/11] platform/x86: apple-gmux: hide PCI specific code Sinan Kaya
2018-12-22 8:03 ` Lukas Wunner
2018-12-22 8:31 ` Sinan Kaya
[not found] ` <CAHp75VfTmWN4bTNPaTL2KYYUWARvix67ynx2cKGzhO3o-0VY=g@mail.gmail.com>
2018-12-25 13:33 ` Sinan Kaya
2018-12-22 0:14 ` [PATCH v1 07/11] drivers: thermal: Hide PCI driver when CONFIG_PCI is unset Sinan Kaya
2018-12-22 0:14 ` [PATCH v1 08/11] ASoC: Intel: Make PCI dependency explicit Sinan Kaya
2018-12-22 3:18 ` Randy Dunlap
2018-12-22 6:26 ` Sinan Kaya
2018-12-22 8:34 ` Sinan Kaya
2018-12-22 0:14 ` [PATCH v1 09/11] mmc: add PCI dependency into IOSF_MBI Sinan Kaya
2018-12-22 0:14 ` [PATCH v1 10/11] x86: select IOSF_MBI only when CONFIG_PCI is set Sinan Kaya
2018-12-22 0:14 ` [PATCH v1 11/11] drivers: thermal: Make PCI dependency explicit Sinan Kaya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181222001452.7474-6-okaya@kernel.org \
--to=okaya@kernel.org \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=qipeng.zha@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox