The driver can be compile tested with !CONFIG_OF or !CONFIG_ACPI making certain data unused: drivers/iio/proximity/sx9500.c:1039:34: error: ‘sx9500_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> --- drivers/iio/proximity/sx9500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c index 8794e75e5bf9..840db1953998 100644 --- a/drivers/iio/proximity/sx9500.c +++ b/drivers/iio/proximity/sx9500.c @@ -1036,13 +1036,13 @@ static const struct acpi_device_id sx9500_acpi_match[] = { }; MODULE_DEVICE_TABLE(acpi, sx9500_acpi_match); -static const struct of_device_id sx9500_of_match[] = { +static const struct of_device_id sx9500_of_match[] __maybe_unused = { { .compatible = "semtech,sx9500", }, { } }; MODULE_DEVICE_TABLE(of, sx9500_of_match); -static const struct i2c_device_id sx9500_id[] = { +static const struct i2c_device_id sx9500_id[] __maybe_unused = { {"sx9500", 0}, { }, }; -- 2.34.1