@@ -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);
}
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(+)