]> git.sur5r.net Git - groeck-nct6775/commitdiff
Use DEVICE_ATTR_RO
authorGuenter Roeck <linux@roeck-us.net>
Wed, 21 Feb 2018 20:58:23 +0000 (12:58 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 21 Feb 2018 20:58:23 +0000 (12:58 -0800)
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
nct6775.c

index 314452e1cc096ae99c5bddf1ce617b4e10340c31..4b205011829d1f1d94448bbf8af027832804a7bf 100644 (file)
--- a/nct6775.c
+++ b/nct6775.c
@@ -3356,14 +3356,14 @@ static const struct sensor_template_group nct6775_pwm_template_group = {
 };
 
 static ssize_t
-show_vid(struct device *dev, struct device_attribute *attr, char *buf)
+cpu0_vid_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
        struct nct6775_data *data = dev_get_drvdata(dev);
 
        return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm));
 }
 
-static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);
+static DEVICE_ATTR_RO(cpu0_vid);
 
 /* Case open detection */