From: Sinan Kaya <okaya@kernel.org>
To: linux-next@vger.kernel.org
Cc: linux-acpi@vger.kernel.org, Sinan Kaya <okaya@kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>,
Amit Kucheria <amit.kucheria@linaro.org>,
"open list:THERMAL" <linux-pm@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: [PATCH v1 07/11] drivers: thermal: Hide PCI driver when CONFIG_PCI is unset
Date: Sat, 22 Dec 2018 00:14:48 +0000 [thread overview]
Message-ID: <20181222001452.7474-8-okaya@kernel.org> (raw)
In-Reply-To: <20181222001452.7474-1-okaya@kernel.org>
This driver is both a platform and PCI driver. Hide PCI specific pieces
when CONFIG_PCI is unset.
Signed-off-by: Sinan Kaya <okaya@kernel.org>
---
.../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);
--
2.19.0
next parent reply other threads:[~2018-12-22 0:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181222001452.7474-1-okaya@kernel.org>
2018-12-22 0:14 ` Sinan Kaya [this message]
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-8-okaya@kernel.org \
--to=okaya@kernel.org \
--cc=amit.kucheria@linaro.org \
--cc=daniel.lezcano@linaro.org \
--cc=edubezval@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=sumeet.r.pawnikar@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;
as well as URLs for NNTP newsgroup(s).