iio: accel: mma7660: Mark acpi match table as maybe unused
authorDaniel Palmer <daniel@0x0f.com>
Sun, 19 Sep 2021 07:26:16 +0000 (16:26 +0900)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 17 Oct 2021 10:05:54 +0000 (11:05 +0100)
When building kernels without ACPI support the table is declared
but is not used because ACPI_PTR() turns it into a NULL.

Add the __maybe_unused attribute to stop the compiler whining.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
Link: https://lore.kernel.org/r/20210919072616.3849723-1-daniel@0x0f.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/mma7660.c

index 47f5cd66e996e8325ee6d21e816fd9325cfb3336..cd6cdf2c51b0f2daf2a1ce54968e96ed8b42ff41 100644 (file)
@@ -254,7 +254,7 @@ static const struct of_device_id mma7660_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, mma7660_of_match);
 
-static const struct acpi_device_id mma7660_acpi_id[] = {
+static const struct acpi_device_id __maybe_unused mma7660_acpi_id[] = {
        {"MMA7660", 0},
        {}
 };