diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c index e5234f953a6d..4fa482ae0eb5 100644 --- a/drivers/hwmon/jc42.c +++ b/drivers/hwmon/jc42.c @@ -390,21 +390,21 @@ static umode_t jc42_is_visible(const void *_data, enum hwmon_sensor_types type, { const struct jc42_data *data = _data; unsigned int config = data->config; - umode_t mode = S_IRUGO; + umode_t mode = 0444; switch (attr) { case hwmon_temp_min: case hwmon_temp_max: if (!(config & JC42_CFG_EVENT_LOCK)) - mode |= S_IWUSR; + mode |= 0200; break; case hwmon_temp_crit: if (!(config & JC42_CFG_TCRIT_LOCK)) - mode |= S_IWUSR; + mode |= 0200; break; case hwmon_temp_crit_hyst: if (!(config & (JC42_CFG_EVENT_LOCK | JC42_CFG_TCRIT_LOCK))) - mode |= S_IWUSR; + mode |= 0200; break; case hwmon_temp_input: case hwmon_temp_max_hyst: