diff options
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r-- | net/dsa/dsa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 5eaadabe23a1..079a224471e7 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c | |||
@@ -124,7 +124,7 @@ static ssize_t temp1_max_store(struct device *dev, | |||
124 | 124 | ||
125 | return count; | 125 | return count; |
126 | } | 126 | } |
127 | static DEVICE_ATTR(temp1_max, S_IRUGO, temp1_max_show, temp1_max_store); | 127 | static DEVICE_ATTR_RW(temp1_max); |
128 | 128 | ||
129 | static ssize_t temp1_max_alarm_show(struct device *dev, | 129 | static ssize_t temp1_max_alarm_show(struct device *dev, |
130 | struct device_attribute *attr, char *buf) | 130 | struct device_attribute *attr, char *buf) |
@@ -159,8 +159,8 @@ static umode_t dsa_hwmon_attrs_visible(struct kobject *kobj, | |||
159 | if (index == 1) { | 159 | if (index == 1) { |
160 | if (!drv->get_temp_limit) | 160 | if (!drv->get_temp_limit) |
161 | mode = 0; | 161 | mode = 0; |
162 | else if (drv->set_temp_limit) | 162 | else if (!drv->set_temp_limit) |
163 | mode |= S_IWUSR; | 163 | mode &= ~S_IWUSR; |
164 | } else if (index == 2 && !drv->get_temp_alarm) { | 164 | } else if (index == 2 && !drv->get_temp_alarm) { |
165 | mode = 0; | 165 | mode = 0; |
166 | } | 166 | } |