summaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@chromium.org>2020-11-02 08:40:07 +0100
committerBjorn Andersson <bjorn.andersson@linaro.org>2020-12-10 20:23:14 +0100
commite59aef4edc45133ccb10b8e962cb74dcf1e3240b (patch)
treef8ede4cbca45c19df351869cb80f4ab8c4e6266e /drivers/remoteproc
parentremoteproc: qcom: Add minidump id for sm8150 modem (diff)
downloadlinux-e59aef4edc45133ccb10b8e962cb74dcf1e3240b.tar.xz
linux-e59aef4edc45133ccb10b8e962cb74dcf1e3240b.zip
remoteproc/mtk_scp: surround DT device IDs with CONFIG_OF
Now that this driver can be compiled with COMPILE_TEST, we have no guarantee that CONFIG_OF will also be defined. When that happens, a warning about mtk_scp_of_match being defined but unused will be reported so make sure this variable is only defined if of_match_ptr() actually uses it. Fixes: cbd2dca74926c0e4610c40923cc786b732c9e8ef remoteproc: scp: add COMPILE_TEST dependency Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Alexandre Courbot <acourbot@chromium.org> Link: https://lore.kernel.org/r/20201102074007.299222-1-acourbot@chromium.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/mtk_scp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
index 74ed675f61a6..7e0f1e1a335b 100644
--- a/drivers/remoteproc/mtk_scp.c
+++ b/drivers/remoteproc/mtk_scp.c
@@ -772,12 +772,14 @@ static const struct mtk_scp_of_data mt8192_of_data = {
.host_to_scp_int_bit = MT8192_HOST_IPC_INT_BIT,
};
+#if defined(CONFIG_OF)
static const struct of_device_id mtk_scp_of_match[] = {
{ .compatible = "mediatek,mt8183-scp", .data = &mt8183_of_data },
{ .compatible = "mediatek,mt8192-scp", .data = &mt8192_of_data },
{},
};
MODULE_DEVICE_TABLE(of, mtk_scp_of_match);
+#endif
static struct platform_driver mtk_scp_driver = {
.probe = scp_probe,