From 4c06393bb57bb3974c9728eac00ccbfd884597b7 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Wed, 21 Feb 2018 12:58:23 -0800 Subject: [PATCH] Use DEVICE_ATTR_RO Signed-off-by: Guenter Roeck --- nct6775.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nct6775.c b/nct6775.c index 314452e..4b20501 100644 --- 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 */ -- 2.39.2