Commit e59aef4e authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Bjorn Andersson

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: cbd2dca7 remoteproc: scp: add COMPILE_TEST dependency
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarAlexandre Courbot <acourbot@chromium.org>
Link: https://lore.kernel.org/r/20201102074007.299222-1-acourbot@chromium.orgSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent d2debca4
...@@ -772,12 +772,14 @@ static const struct mtk_scp_of_data mt8192_of_data = { ...@@ -772,12 +772,14 @@ static const struct mtk_scp_of_data mt8192_of_data = {
.host_to_scp_int_bit = MT8192_HOST_IPC_INT_BIT, .host_to_scp_int_bit = MT8192_HOST_IPC_INT_BIT,
}; };
#if defined(CONFIG_OF)
static const struct of_device_id mtk_scp_of_match[] = { static const struct of_device_id mtk_scp_of_match[] = {
{ .compatible = "mediatek,mt8183-scp", .data = &mt8183_of_data }, { .compatible = "mediatek,mt8183-scp", .data = &mt8183_of_data },
{ .compatible = "mediatek,mt8192-scp", .data = &mt8192_of_data }, { .compatible = "mediatek,mt8192-scp", .data = &mt8192_of_data },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, mtk_scp_of_match); MODULE_DEVICE_TABLE(of, mtk_scp_of_match);
#endif
static struct platform_driver mtk_scp_driver = { static struct platform_driver mtk_scp_driver = {
.probe = scp_probe, .probe = scp_probe,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment