hwmon: (ads7828) Fix build warning
authorGuenter Roeck <linux@roeck-us.net>
Thu, 4 Apr 2019 13:36:51 +0000 (06:36 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 16 Apr 2019 00:19:53 +0000 (17:19 -0700)
If CONFIG_OF is not enabled, the following build warning is observed.

drivers/hwmon/ads7828.c:203:34: warning:
‘ads7828_of_match’ defined but not used

Mark ads7828_of_match as __maybe_unused to fix the problem.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ads7828.c

index 12c56d3..e6be617 100644 (file)
@@ -200,7 +200,7 @@ static const struct i2c_device_id ads7828_device_ids[] = {
 };
 MODULE_DEVICE_TABLE(i2c, ads7828_device_ids);
 
-static const struct of_device_id ads7828_of_match[] = {
+static const struct of_device_id __maybe_unused ads7828_of_match[] = {
        {
                .compatible = "ti,ads7828",
                .data = (void *)ads7828