usb: typec: fusb302: mark OF related data as maybe unused
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fri, 10 Mar 2023 22:29:37 +0000 (23:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Mar 2023 11:15:35 +0000 (12:15 +0100)
The driver can be compile tested with !CONFIG_OF making certain data
unused:

  drivers/usb/typec/tcpm/fusb302.c:1816:34: error: ‘fusb302_dt_match’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230310222937.315773-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/fusb302.c

index 1ffce00d94b46217c1d07d6b94cf4595e68d6590..592b0aec782f2e6f5cb10b5a64a6f20c81c32f8f 100644 (file)
@@ -1813,7 +1813,7 @@ static int fusb302_pm_resume(struct device *dev)
        return 0;
 }
 
-static const struct of_device_id fusb302_dt_match[] = {
+static const struct of_device_id fusb302_dt_match[] __maybe_unused = {
        {.compatible = "fcs,fusb302"},
        {},
 };