OSDN Git Service

hwmon: (tmp103) Fix build warning
authorGuenter Roeck <linux@roeck-us.net>
Thu, 4 Apr 2019 13:28:34 +0000 (06:28 -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/tmp103.c:173:34: warning:
‘tmp103_of_match’ defined but not used

Marking tmp103_of_match as __maybe_unused fixes the problem.

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

index bda0fdc..a91726d 100644 (file)
@@ -170,7 +170,7 @@ static const struct i2c_device_id tmp103_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, tmp103_id);
 
-static const struct of_device_id tmp103_of_match[] = {
+static const struct of_device_id __maybe_unused tmp103_of_match[] = {
        { .compatible = "ti,tmp103" },
        { },
 };