]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
hwmon: (ads1015) Fix build warning
authorGuenter Roeck <linux@roeck-us.net>
Thu, 4 Apr 2019 13:29:51 +0000 (06:29 -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/ads1015.c:310:34: warning:
‘ads1015_of_match’ defined but not used

Marking ads1015_of_match as __maybe_unused fixes the problem.

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

index c21b0529adb2e821c08568baa5ddf553640ffa83..412ab7015d75e62341c805d6760c2f07a6969099 100644 (file)
@@ -307,7 +307,7 @@ static const struct i2c_device_id ads1015_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, ads1015_id);
 
-static const struct of_device_id ads1015_of_match[] = {
+static const struct of_device_id __maybe_unused ads1015_of_match[] = {
        {
                .compatible = "ti,ads1015",
                .data = (void *)ads1015