OSDN Git Service

hwmon: (pmbus/ucd9200): Mark ucd9200_of_match as maybe_unused
authorGuenter Roeck <linux@roeck-us.net>
Thu, 4 Apr 2019 13:13:31 +0000 (06:13 -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/pmbus/ucd9200.c:50:34: warning:
‘ucd9200_of_match’ defined but not used

Mark it as __maybe_unused to fix the problem.

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

index 3ed9458..fec7656 100644 (file)
@@ -47,7 +47,7 @@ static const struct i2c_device_id ucd9200_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, ucd9200_id);
 
-static const struct of_device_id ucd9200_of_match[] = {
+static const struct of_device_id __maybe_unused ucd9200_of_match[] = {
        {
                .compatible = "ti,cd9200",
                .data = (void *)ucd9200