regulator: lp872x: Mark OF related data as maybe unused
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fri, 10 Mar 2023 21:45:45 +0000 (22:45 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 13 Mar 2023 14:08:57 +0000 (14:08 +0000)
The driver can be compile tested with !CONFIG_OF making certain data
unused:

  drivers/regulator/lp872x.c:931:34: error: ‘lp872x_dt_ids’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230310214553.275450-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/lp872x.c

index b5d83a63991b0181202080a7f679612b5afca7e1..26ed989460c07d44bf4b7e08192c6723bd436e2b 100644 (file)
@@ -927,7 +927,7 @@ static int lp872x_probe(struct i2c_client *cl)
        return lp872x_regulator_register(lp);
 }
 
-static const struct of_device_id lp872x_dt_ids[] = {
+static const struct of_device_id lp872x_dt_ids[] __maybe_unused = {
        { .compatible = "ti,lp8720", },
        { .compatible = "ti,lp8725", },
        { }