[PATCH] goldfish: Fix unused const variable 'goldfish_pipe_acpi_match'
From: Zeng Heng
Date: Fri Oct 25 2024 - 03:28:03 EST
Fix the following compilation warning:
drivers/platform/goldfish/goldfish_pipe.c:925:36: warning:
‘goldfish_pipe_acpi_match’ defined but not used
[-Wunused-const-variable=]
925 | static const struct acpi_device_id goldfish_pipe_acpi_match[] = {
Only define the const variable when the CONFIG_ACPI is enabled.
Fixes: d62f324b0ac8 ("goldfish: Enable ACPI-based enumeration for android pipe")
Signed-off-by: Zeng Heng <zengheng4@xxxxxxxxxx>
---
drivers/platform/goldfish/goldfish_pipe.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index c2aab0cfab33..aeabacba3760 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -922,11 +922,13 @@ static void goldfish_pipe_remove(struct platform_device *pdev)
goldfish_pipe_device_deinit(pdev, dev);
}
+#ifdef CONFIG_ACPI
static const struct acpi_device_id goldfish_pipe_acpi_match[] = {
{ "GFSH0003", 0 },
{ },
};
MODULE_DEVICE_TABLE(acpi, goldfish_pipe_acpi_match);
+#endif
static const struct of_device_id goldfish_pipe_of_match[] = {
{ .compatible = "google,android-pipe", },
--
2.25.1