i2c: synquacer: mark OF related data as maybe unused
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sat, 11 Mar 2023 11:16:58 +0000 (12:16 +0100)
committerWolfram Sang <wsa@kernel.org>
Wed, 29 Mar 2023 18:54:28 +0000 (20:54 +0200)
The driver can be compile tested with !CONFIG_OF making certain data
unused:

  drivers/i2c/busses/i2c-synquacer.c:632:34: error: ‘synquacer_i2c_dt_ids’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-synquacer.c

index e4026c5416b158d6743df6bf7ce9bdb73474d750..50d19cf99a03a75c693430c4a2b9bbf5ff179147 100644 (file)
@@ -629,7 +629,7 @@ static int synquacer_i2c_remove(struct platform_device *pdev)
        return 0;
 };
 
-static const struct of_device_id synquacer_i2c_dt_ids[] = {
+static const struct of_device_id synquacer_i2c_dt_ids[] __maybe_unused = {
        { .compatible = "socionext,synquacer-i2c" },
        { /* sentinel */ }
 };