Skip to contentSkip to conversation

iio: imu: inv_mpu6050: Mark acpi match table as maybe unused

PATCH Superseded Daniel Palmer 1 participant 1 message Sep 13, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: imu: inv_mpu6050: Mark acpi match table as maybe unused

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.

---
 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c +1 -1
index 95f16951c8f4..dbd613178f01 100644
@@ -249,7 +249,7 @@ static const struct of_device_id inv_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, inv_of_match);
 
-static const struct acpi_device_id inv_acpi_match[] = {
+static const struct __maybe_unused acpi_device_id inv_acpi_match[] = {
 	{"INVN6500", INV_MPU6500},
 	{ },
 };
Signature · 1 line
2.33.0