]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
goldfish: Fix unused const variable 'goldfish_pipe_acpi_match'
authorZeng Heng <zengheng4@huawei.com>
Sat, 26 Oct 2024 07:01:50 +0000 (15:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Nov 2024 04:33:46 +0000 (05:33 +0100)
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[] = {

The complexity of config guards needed for ACPI_PTR() is not worthwhile
for the small amount of saved data. So remove the use of ACPI_PTR instead
and drop now unneeded linux/acpi.h include.

Fixes: d62f324b0ac8 ("goldfish: Enable ACPI-based enumeration for android pipe")
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Link: https://lore.kernel.org/r/20241026070150.3239819-1-zengheng4@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/goldfish/goldfish_pipe.c

index c2aab0cfab338376d09e4243271e378fecc9de8c..ca78e58331360383667241e0b1b1b548d6cdb0b2 100644 (file)
@@ -61,7 +61,6 @@
 #include <linux/io.h>
 #include <linux/dma-mapping.h>
 #include <linux/mm.h>
-#include <linux/acpi.h>
 #include <linux/bug.h>
 #include "goldfish_pipe_qemu.h"
 
@@ -940,7 +939,7 @@ static struct platform_driver goldfish_pipe_driver = {
        .driver = {
                .name = "goldfish_pipe",
                .of_match_table = goldfish_pipe_of_match,
-               .acpi_match_table = ACPI_PTR(goldfish_pipe_acpi_match),
+               .acpi_match_table = goldfish_pipe_acpi_match,
        }
 };