mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
hwmon: (nct6775) Do not create non-existing attributes
Overtemperature and hysteresis registers only exist for primary temperature registers, not for alternates, so do not assign those registers when initializing alternates. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
4510d198f9
commit
169c05cd54
1 changed files with 4 additions and 2 deletions
|
@ -3705,8 +3705,10 @@ static int nct6775_probe(struct platform_device *pdev)
|
||||||
data->have_temp |= 1 << i;
|
data->have_temp |= 1 << i;
|
||||||
data->have_temp_fixed |= 1 << i;
|
data->have_temp_fixed |= 1 << i;
|
||||||
data->reg_temp[0][i] = reg_temp_alternate[i];
|
data->reg_temp[0][i] = reg_temp_alternate[i];
|
||||||
data->reg_temp[1][i] = reg_temp_over[i];
|
if (i < num_reg_temp) {
|
||||||
data->reg_temp[2][i] = reg_temp_hyst[i];
|
data->reg_temp[1][i] = reg_temp_over[i];
|
||||||
|
data->reg_temp[2][i] = reg_temp_hyst[i];
|
||||||
|
}
|
||||||
data->temp_src[i] = i + 1;
|
data->temp_src[i] = i + 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue