hwmon: (tmp421) Fix build warning
authorGuenter Roeck <linux@roeck-us.net>
Thu, 4 Apr 2019 14:50:26 +0000 (07:50 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 16 Apr 2019 00:19:53 +0000 (17:19 -0700)
The following build warning is seen if CONFIG_OF is disabled.

drivers/hwmon/tmp421.c:73:34: warning:
‘tmp421_of_match’ defined but not used

Mark tmp421_of_match as __maybe_unused to fix the problem.

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

index 2732a71f3b398bfff17e63b8ad22857e5a4b1759..5e63010dd3a0d7db50c6fac82f6b230951415aa6 100644 (file)
@@ -70,7 +70,7 @@ static const struct i2c_device_id tmp421_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, tmp421_id);
 
-static const struct of_device_id tmp421_of_match[] = {
+static const struct of_device_id __maybe_unused tmp421_of_match[] = {
        {
                .compatible = "ti,tmp421",
                .data = (void *)2